https://www.udemy.com/aws-certified-solutions-architect-associate/learn/v4/t/lecture/2050700?start=0
DynamoDB is a fast and flexible NoSQL database service for all appliations that need consistent, single-digit millisecond latency at any scale. It is a fully managed database and supports both document and key-value data models. Its flexible data model and reliable performance make it a great fit for mobile, we, gaming ad-tech, IoT and many other applications.
- Stored on SSD storage
- Spread Across 3 geographically distinct data centers
- Eventual Consistent Reads (Default)
- Consistency across all copies of data is usually reached within a second. Reapeating a read after a short time should return the updated data. (Best Read Performance)
- Strongly Consistent Reads
- A strongly consistent read returns a result that reflects all writes that received a successful response prior to the read.
Pricing
- Provisioned through capacity
- Capacity Units = 1 read or write per second.
- Write throughput $0.0065 per hour for every 10 units.
- Read throughput $0.0065 per hour for every 50 units.
- Storage costs of $0.25GB per month.
- DynamoDB does provide substantial discounts for “Reserved Capacity”, similar to a reserved instance.
Pricing Example
Let’s assume that your application needs to perform 1 million writes and 1 million reads per day, while storing 3 GB of data.
First, you need to calculate how many writes and reads per second you need.
1,000,000/ (24*60*60)=11.6 writes per second.
- Write costs = ($0.0065/10) x 12 (round up) x 24 (hours per day) = $0.1872
- Read costs = ($0.0065/50) x 12 x 24 = $0.0374
DynamoDB is cost effective for reads, but expensive to write. If you have a database that relies heavily on Reads, must be very scalable with great performance and does not require any Table Joins (these do not work with NoSQL) then DynamoDB might be a great solution for you.
Scaling
When a DynamoDB database is initially configured, you ‘guess’ at how many read and write capacity units you require. You can then look under ‘Metrics’ to see how many you’re actually consuming. Scaling (up or down) is performed on the fly by modifying the number of read/write capacity units and requires NO downtime!