Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to Amazon DynamoDB
Sean Shriver
NoSQL Solutions Architect
AWS Solution Architecture
15 March 2017
Agenda
• Brief history of data processing
• Relational (SQL) vs. nonrelational (NoSQL)
• NoSQL solutions on AWS
• Amazon D...
Data volume since 2010
• 90% of stored data generated in
last 2 years
• 1 terabyte of data in 2010 equals
6.5 petabytes to...
Timeline of database technology
DataPressure
Technology adoption and the hype curve
Relational (SQL) vs.
nonrelational (NoSQL)
Relational vs. nonrelational databases
Traditional SQL NoSQL
DB
Primary Secondary
Scale up
DB
DB
DBDB
DB DB
Scale out
SQL (Relational)
Price Desc.
$11.50
$8.99
Chaplin’s
first …
Columns
Rows
Primary Key Index
$14.95
One of 2
major …
The
Par...
SQL (Relational)
Price Desc.
$11.50
$8.99
Chaplin’s
first …
Columns
Rows
Primary Key Index
$14.95
One of 2
major …
The
Par...
SQL (Relational)
Price Desc.
$11.50
$8.99
Chaplin’s
first …
Columns
Rows
Primary Key Index
$14.95
One of 2
major …
The
Par...
SQL (Relational)
Products
Price Desc.
$11.50
$8.99
Chaplin’s
first …
Columns
Rows
Primary Key Index
$14.95
One of 2
major ...
SQL (Relational)
Price Desc.
$11.50
$8.99
Chaplin’s
first …
Columns
Rows
Primary Key Index
$14.95
One of 2
major …
The
Par...
SQL (Relational) vs. NoSQL (Non-relational)
Product
ID
Type
Odyssey Homer1 Book ID
2 Album ID 6 Partitas
2
Album ID:
Track...
Why NoSQL?
Optimized for storage Optimized for compute
Normalized/relational Denormalized/hierarchical
Ad hoc queries Inst...
NoSQL solutions using Amazon EC2 and EBS
DB hosted on-premises DB hosted on Amazon EC2
The Forrester Wave™ is copyrighted by Forrester Research, Inc. Forrester and Forrester Wave™ are trademarks of Forrester
R...
Amazon DynamoDB
Run your business, not your database
Fully managed
Fast, consistent performance
Highly scalable
Flexible
Event-driven programming
Fine-grained access control
D...
Fully managed service = automated operations
DB hosted on-premises DB hosted on Amazon EC2
Fully managed service = automated operations
DB hosted on premise DynamoDB
Consistently low latency at scale
PREDICTABLE
PERFORMANCE!
WRITES
Replicated continuously to 3 AZs
Persisted to disk (custom SSD)
READS
Strongly or eventually consistent
No latency ...
Customer use cases
Amazon’s Path to DynamoDB
Amazon
DynamoDB
Oracle
Database
MLBAM (MLB Advanced Media) is a full service solutions
provider, operating a powerful content delivery platform.
For the f...
Redfin is a full-service real estate company with local
agents and online tools to help people buy & sell homes.
We have b...
Duolingo Scales to Store Over 31 Billion Items
Using DynamoDB
Duolingo is a free language learning service where
users hel...
Nexon is a leading South Korean video game developer
and a pioneer in the world of interactive entertainment.
By using AWS...
Ad Tech Gaming MobileIoT Web
Scaling high-velocity use cases with DynamoDB
That sounds really good. How
do I get started?
Let’s create a table..
Products
Product_Id
DynamoDB table structure
Table
Items
Attributes
Partition
key
Sort
key
Mandatory
Key-value access pattern
Determines data ...
Global secondary index (GSI)
GSIs
A5
(part.)
A4
(sort)
A1
(table key)
A3
(projected)
Table
INCLUDE A3
A4
(part.)
A5
(sort)...
Local secondary index (LSI)
Alternate sort key attribute
Index is local to a partition key
A1
(partition)
A3
(sort)
A2
(ta...
Integration capabilities
DynamoDB Triggers
 Implemented as AWS
Lambda functions
 Your code scales
automatically
 Java, ...
Integration capabilities
• Amazon Elasticsearch Service
integration
• Full-text queries
 Add search to mobile apps
 Moni...
Advanced topics in DynamoDB
• Design patterns and best practices
• Data modeling
• Understanding Partitions
• DynamoDB Sca...
Demo
Serverless Web Apps with Amazon
DynamoDB, API Gateway, and AWS Lambda
Simple serverless web application – use case
Elastic event driven applications
Elastic event driven applications
Elastic event driven applications
Elastic event driven applications
Elastic event driven applications
Demo
• Free Tier
 25GB of storage
 25 Reads per second
 25 Writes per second
• Pricing for additional usage in US East (N. V...
Resources
Amazon DynamoDB: https://aws.amazon.com/dynamodb/
NoSQL on AWS: https://aws.amazon.com/nosql/document/
Upcoming ...
aws.amazon.com/activate
Everything and Anything Startups
Need to Get Started on AWS
Introduction to Amazon DynamoDB
Upcoming SlideShare
Loading in …5
×

Introduction to Amazon DynamoDB

1,429 views

Published on

This session will begin with an introduction to non-relational (NoSQL) databases and compare them with relational (SQL) databases. Learn the fundamentals of Amazon DynamoDB, a fully managed NoSQL database service, and see the DynamoDB console first-hand. See a walk-through demo of building a serverless web application using this high-performance key-value and JSON document store.

  • Hey guys! Who wants to chat with me? More photos with me here 👉 http://www.bit.ly/katekoxx
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Introduction to Amazon DynamoDB

  1. 1. Introduction to Amazon DynamoDB Sean Shriver NoSQL Solutions Architect AWS Solution Architecture 15 March 2017
  2. 2. Agenda • Brief history of data processing • Relational (SQL) vs. nonrelational (NoSQL) • NoSQL solutions on AWS • Amazon DynamoDB’s fully managed features • Demo – serverless applications
  3. 3. Data volume since 2010 • 90% of stored data generated in last 2 years • 1 terabyte of data in 2010 equals 6.5 petabytes today • Linear correlation between data pressure and technical innovation • No reason these trends will not continue over time
  4. 4. Timeline of database technology DataPressure
  5. 5. Technology adoption and the hype curve
  6. 6. Relational (SQL) vs. nonrelational (NoSQL)
  7. 7. Relational vs. nonrelational databases Traditional SQL NoSQL DB Primary Secondary Scale up DB DB DBDB DB DB Scale out
  8. 8. SQL (Relational) Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Products Book Album Movie
  9. 9. SQL (Relational) Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Products Book Album Movie Books Title Date Odyssey 1871 Book ID 1 Books Author Homer
  10. 10. SQL (Relational) Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Products Book Album Movie Books Title Date Odyssey 1871 Book ID 1 Books Genre Director Drama, Comedy Chaplin Movie ID Title 3 The Kid Movies Author Homer
  11. 11. SQL (Relational) Products Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Book Album Movie Books Albums Title Date Odyssey 1871 Book ID 1 Books Albums Title 6 Partitas Album ID Artist 2 Genre Director Drama, Comedy Chaplin Movie ID Title 3 The Kid Movies Bach Author Homer
  12. 12. SQL (Relational) Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Books Albums Products Book Album Movie Title Date Odyssey 1871 Book ID 1 Books Albums Title 6 Partitas Album ID Artist 2 Genre Director Drama, Comedy Chaplin Movie ID Title 3 The Kid Movies Tracks Track Partita No. 1 Album ID Track ID 2 1 Bach Author Homer
  13. 13. SQL (Relational) vs. NoSQL (Non-relational) Product ID Type Odyssey Homer1 Book ID 2 Album ID 6 Partitas 2 Album ID: Track ID Partita No. 1 Bach Attributes Schema is defined per item Items Partition Key Sort Key 3 Movie ID The Kid Drama, Comedy 1871 Chaplin Primary Key Products Price Desc. $11.50 $8.99 Chaplin’s first … Columns Rows Primary Key Index $14.95 One of 2 major … The Partitas Product ID Type 1 2 3 Title Date Odyssey 1871 Book ID 1 Books Albums Title 6 Partitas Album ID Artist 2 Genre Director Drama, Comedy Chaplin Movie ID Title 3 The Kid Movies Products Book Album Movie Tracks Track Partita No. 1 Album ID Track ID 2 1 Author Homer Bach NoSQL design optimizes for compute instead of storage
  14. 14. Why NoSQL? Optimized for storage Optimized for compute Normalized/relational Denormalized/hierarchical Ad hoc queries Instantiated views Scale vertically Scale horizontally Good for OLAP Built for OLTP at scale SQL NoSQL
  15. 15. NoSQL solutions using Amazon EC2 and EBS DB hosted on-premises DB hosted on Amazon EC2
  16. 16. The Forrester Wave™ is copyrighted by Forrester Research, Inc. Forrester and Forrester Wave™ are trademarks of Forrester Research, Inc. The Forrester Wave™ is a graphical representation of Forrester's call on a market and is plotted using a detailed spreadsheet with exposed scores, weightings, and comments. Forrester does not endorse any vendor, product, or service depicted in the Forrester Wave. Information is based on best available resources. Opinions reflect judgment at the time and are subject to change. The Forrester Wave™: Big Data NoSQL, Q3 2016
  17. 17. Amazon DynamoDB Run your business, not your database
  18. 18. Fully managed Fast, consistent performance Highly scalable Flexible Event-driven programming Fine-grained access control DynamoDB Benefits
  19. 19. Fully managed service = automated operations DB hosted on-premises DB hosted on Amazon EC2
  20. 20. Fully managed service = automated operations DB hosted on premise DynamoDB
  21. 21. Consistently low latency at scale PREDICTABLE PERFORMANCE!
  22. 22. WRITES Replicated continuously to 3 AZs Persisted to disk (custom SSD) READS Strongly or eventually consistent No latency trade-off Designed to support 99.99% of availability Built for high durability High availability and durability
  23. 23. Customer use cases
  24. 24. Amazon’s Path to DynamoDB Amazon DynamoDB Oracle Database
  25. 25. MLBAM (MLB Advanced Media) is a full service solutions provider, operating a powerful content delivery platform. For the first time, we can measure things we’ve never been able to measure before. Joe Inzerillo Executive Vice President and CTO, MLBAM ” “ • MLBAM can scale to support many games on a single day. • Amazon DynamoDB powers queries and supports the fast data retrieval required. • MLBAM distributes 25,000 live events annually and 10 million streams daily. Major League Baseball Fields Big Data, Excitement with Amazon DynamoDB
  26. 26. Redfin is a full-service real estate company with local agents and online tools to help people buy & sell homes. We have billions of records on DynamoDB being refreshed daily or hourly or even by seconds. Yong Huang Director, Big Data Analytics, Redfin ” “ • Redfin provides property and agent details and ratings through its websites and apps. • With DynamoDB, latency for “similar” properties improved from 2 seconds to just 12 milliseconds. • Redfin stores and processes five billion items in DynamoDB. Redfin Is Revolutionizing Home Buying and Selling with Amazon DynamoDB
  27. 27. Duolingo Scales to Store Over 31 Billion Items Using DynamoDB Duolingo is a free language learning service where users help translate the web and rate translations. Using AWS, we can handle traffic spikes that expand up to seven times the amount of normal traffic. Severin Hacker CTO, Duolingo ” “ • Duolingo stores data about each user to be able to generate personalized lessons. • The MySQL database couldn’t keep up with Duolingo’s rate of growth • By using the scalable database service, data store capacity increased from 100 million to more than four billion items • Duolingo has the capacity to scale to support over 8 million active users
  28. 28. Nexon is a leading South Korean video game developer and a pioneer in the world of interactive entertainment. By using AWS, we decreased our initial investment costs, and only pay for what we use. Chunghoon Ryu Department Manager, Nexon ” “ • Nexon used Amazon DynamoDB as its primary game database for a new blockbuster mobile game, HIT • HIT became the #1 Mobile Game in Korea within the first day of launch and has > 2M registered users • Nexon’s HIT leverages DynamoDB to deliver steady latency of less than 10ms to deliver a fantastic mobile gaming experience for 170,000 concurrent players Nexon Scales Mobile Gaming with Amazon DynamoDB
  29. 29. Ad Tech Gaming MobileIoT Web Scaling high-velocity use cases with DynamoDB
  30. 30. That sounds really good. How do I get started? Let’s create a table..
  31. 31. Products Product_Id
  32. 32. DynamoDB table structure Table Items Attributes Partition key Sort key Mandatory Key-value access pattern Determines data distribution Optional Model 1:N relationships Enables rich query capabilities All items for key ==, <, >, >=, <= “begins with” “between” “contains” “in” sorted results counts top/bottom N values
  33. 33. Global secondary index (GSI) GSIs A5 (part.) A4 (sort) A1 (table key) A3 (projected) Table INCLUDE A3 A4 (part.) A5 (sort) A1 (table key) A2 (projected) A3 (projected) ALL A2 (part.) A1 (table key) KEYS_ONLY RCU/WCU provisioned separately for GSIs Online Indexing A1 (partition) A2 A3 A4 A5 Alternate partition (+sort) key Index is across all table partition keys
  34. 34. Local secondary index (LSI) Alternate sort key attribute Index is local to a partition key A1 (partition) A3 (sort) A2 (table key) A1 (partition) A2 (sort) A3 A4 A5 LSIs A1 (partition) A4 (sort) A2 (table key) A3 (projected) Table KEYS_ONLY INCLUDE A3 A1 (partition) A5 (sort) A2 (table key) A3 (projected) A4 (projected) ALL 10 GB max per partition key, i.e. LSIs limit the # of sort keys!
  35. 35. Integration capabilities DynamoDB Triggers  Implemented as AWS Lambda functions  Your code scales automatically  Java, Node.js, and Python DynamoDB Streams  Stream of table updates  Asynchronous  Exactly once  Strictly ordered  24-hr lifetime per item
  36. 36. Integration capabilities • Amazon Elasticsearch Service integration • Full-text queries  Add search to mobile apps  Monitor IoT sensor status codes  App telemetry pattern discovery using regular expressions • Fine-grained access control by using AWS Identity and Access Management (IAM) • Table-, item-, and attribute- level access control
  37. 37. Advanced topics in DynamoDB • Design patterns and best practices • Data modeling • Understanding Partitions • DynamoDB Scaling
  38. 38. Demo Serverless Web Apps with Amazon DynamoDB, API Gateway, and AWS Lambda
  39. 39. Simple serverless web application – use case
  40. 40. Elastic event driven applications
  41. 41. Elastic event driven applications
  42. 42. Elastic event driven applications
  43. 43. Elastic event driven applications
  44. 44. Elastic event driven applications
  45. 45. Demo
  46. 46. • Free Tier  25GB of storage  25 Reads per second  25 Writes per second • Pricing for additional usage in US East (N. Virginia)  $0.25 per GB per month  Write throughput: $0.0065 per hour for every 10 units of Write Capacity  Read throughput: $0.0065 per hour for every 50 units of Read Capacity DynamoDB Pricing & Free Tier
  47. 47. Resources Amazon DynamoDB: https://aws.amazon.com/dynamodb/ NoSQL on AWS: https://aws.amazon.com/nosql/document/ Upcoming session: Deep Dive: Amazon DynamoDB
  48. 48. aws.amazon.com/activate Everything and Anything Startups Need to Get Started on AWS

×