DynamoDB Flashcards
What is DynamoDB?
Fast, flexible NoSQL database
single digit latency at any scale
supports document and key-value data models
Great fit for mobile, web, gaming, ad-tech, IoT
Facts
Stored on SSD
Spread across 3 geographically distinct data centers
they don’t say AZ’s
Eventual Consistent Read type
Consistency across all copies of data reached within one second
Best read performance
Strongly Consistent Read type
Returns result that reflects all writes that received a successful response prior to the read
DynamoDB pricing
based on throughput capacity
Write throughput pricing
$.0065 per hour for 10 units
Read throughput pricing
$.0065 per hour for 50 units
Storage pricing
$.25 / Gb per month
Calculate writes and reads per second
1 million writes per day is:
1,000,000 / 24 hours / 60 minutes / 60 seconds
= 11.6 writes per second
DynamoDB write capacity unit
handles 1 write per second
so in example of 11.6 writes/second you need 12 write capacity units
($.0065 / 10) * 12 * 24 = $.1872 per day
Metrics to watch for performance
Read, Write capacity units
shows provisioned vs consumed so you can see if you are under or over provisioned
How do you scale DynamoDB up or down?
Go to capacity and add/remove read or write capacity units
On the fly, now downtime
Compare to RDS where you need a snapshot or read-replica, adjust instance size
How do you scale DynamoDB up or down?
Go to capacity and add/remove read or write capacity units
On the fly, now downtime
Compare to RDS where you need a snapshot or read-replica, adjust instance size