In this talk from the Dublin Websummit 2014 AWS Technical Evangelist Danilo Poccia discusses NoSQL technology.
Includes an introduction to NoSQL DB and a discussion of when it is time to consider NoSQL.
Danilo also introduces Amazon DynamoDB as a NoSQL solution and talks through several case studies of customers that are using Amazon DynamoDB today.
17. Amazon DynamoDB
NoSQL Database
Fast & predictable performance
Seamless Scalability
Easy administration
“Even though we have years of experience with large, complex NoSQL
architectures, we are happy to be finally out of the business of managing it
ourselves.” - Don MacAskill, CEO
ADMIN
18. Access and Query Model
Two primary key options
§ Hash key: Key lookups: “Give me the status for user foo”
§ Composite key (Hash with Range): “Give me all the status updates for user ‘foo’
that occurred within the past 24 hours”
Support for multiple data types
§ Scalar: number, string, binary
§ Multi-valued: number set, string set, binary set
Consistency: Supports both strong and eventual consistency
§ Pick consistency mode at per API call
§ Different parts of applications can make different choices
23. User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
Social Network
Users Table
24. User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
Social Network
Users Table
Item
25. User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
Social Network
Users Table
Attribute
(string, number, binary, set)
26. User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
Social Network
Users Table
Primary Key
(Hash)
27. User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
Social Network
Friends Table
User Friend
Bob Alice
Alice Bob
Alice Carol
Alice Dan
Users Table
28. Social Network
Friends Table
User Friend
Bob Alice
Alice Bob
Alice Carol
Alice Dan
Users Table
Hash-and-Range
Primary Key Schema User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
29. Social Network
Friends Table
User Friend
Bob Alice
Alice Bob
Alice Carol
Alice Dan
Query for Alice’s friends
Users Table
User Birthday
Bob 11.02
Alice 15.10
Carol 30.06
Dan 05.01
30. DynamoDB Indexes
Local Secondary Index (LSI)
- Same Hash Key as Primary Key
- Different Range Key
Global Secondary Index (GSI)
- New Hash and Range Key
- Eventually Consistent
31. DynamoDB Highlights: Performance
Typical service-side latency: single digit milliseconds
Solid State Drive (SSD)-backed service
Latency is consistent
– As throughput increases
– As storage grows
No need for tuning.
32. DynamoDB Highlights: Reliability
Durability
– Synchronous replication for high durability
– A write is only acknowledged (committed) once it exists in at least two
physical data centers
– All writes occur to disk, not memory
Availability
– Regional service
– Spans multiple
Availability Zones (AZ)
– All data is continuously
replicated to multiple AZ’s
33. Provisioned Throughput
Reserve the throughput needed for each table
– Set at table creation
– Example: My table needs 1,000 writes/second and
5,000 reads/seconds of capacity
Increase / decrease via API call
Pay for throughput and storage (not instances)
34. Provisioned Throughput
Why?
– Simpler capacity planning
– Easy to translate calls to Apps => calls to database
– Not in terms of servers and disk IOPS
– Do not be locked in your peak
for month or year!
35. Capacity we needed before DynamoDB
Actual traffic
Capacity we can provision
with DynamoDB