AWS DynamoDB Throughput Capacity

AWS DynamoDB Throughput Capacity
The AWS DynamoDB throughput capacities are dependent on the read/write capacity modes that process reads and write on the tables.
DynamoDB supports two types read/write capacity modes: On-demand
ProvisionedNOTE: Provisioned mode is covered by the AWS Certified Developer Associate exam (DVA–C01), esp. The calculations. The latest enhancement is the On-Demand Capacity Mode. It is not yet included in the exams.
Provisioned Mode
Provisioned mode requires that you specify the number reads and write per second required by the application.
Provisioned throughput refers to the maximum amount of capacity an application can consume from a index or table.
If the provisioned throughput capacity of a table or index is exceeded it will be subject to request throttle
Provisioned mode is good for applications with predictable traffic.
Consistent traffic
Capacity forecasting to control costs
Provisioned mode offers the following capacity units Read Capacity units (RCU). The total number of read capacity units is dependent on the item’s size and the consistent read model (eventually, strongly).
One RCU is two eventually consistent reads per sec for an item of up to 4 KB size. 8 KB
One strongly consistent read per second on items up to 4 KB size 2x the cost of eventually consistent readings
Transactional read requests require two read capacity unit to perform one read per sec for items up to 4KB. i.e. 2x the cost of readings that are strongly consistent
For items larger than 4 KB, DynamoDB will need to consume additional read capacity units. For an item of 8 KB size, DynamoDB will require 2 read capacity units to support one strong consistent read per second, 1 read capability unit if you choose eventually consistent readings, and 4 read capacity units for a transactional request.
For example, the item size is rounded to 4KB equivalents. A 6 KB or 8 KB item would need the same RCU
Write Capacity Units (WCU). The total number of write capacity units needed depends on the item’s size.
One write per second for items up to 1 KB
Transactional write requests require two write capacity units to perform one transaction per second for items greater than 1 KB. i.e. 2x the cost of general writing.
DynamoDB will need to consume additional read capacity units if items are larger than 1 KB. For a 2 KB item, 2 write capacity unit would be required to support one write request per second. 4 write capacity units are required for a transactional request.
For example, the item size is rounded to 1 KB equivalents. A 0.5 KB or 1 KB item would both require the same WCUProvisioned Mod Examples
DynamoDB table can be provisioned with 10 RCUs or 10 WCUs. Read throughputEventual consistency = 4KB x 10 x 2 = 80KB/sec
Strong consistency = 4KB x 10 = 40KB/sec
Transactional consistency = 4KB x 10 x 1/2 = 20KB/sec
Write throughputEventual with Strong consistency = 10 *1KB = 10KB/sec
Transaction consistency = 10 * 1KB* 1/2 = 5KB/sec
Capacity units for reading and writing 15KB itemReading capacity units – 15KB rounded up to 4 blocks of 4KB =4 RCUsEventual consistency * 1/2 =2 RCUs
Strong consistency 4 RCUs *1 = 4 RCUs
Transactional consistency 4 RCUs *2 = 8 RCUs
Write capacity units 15KB =15 WCUsEventual & Strong consistency 15 WCUs *1 = 15 WCUs
Transactional consistency 15 WCUs *2 = 30 RCUsOnly Mode
Flexible billing options are available for On-Demand mode. This allows you to serve thousands of requests per second, without the need to plan for capacity.
It is not necessary to indicate the expected read- and write throughput
Only the reads and writings that the application does on the tables are charged.
Pay-per-Request Pricing for Read and Write Requests. You pay only for what you use
DynamoDB adjusts quickly to meet changing loads
DynamoDB on demand using request units that are similar to provisioned capacities Units
On-demand mode