DynamoDB Capacity Mode Cost Thresholds for Low-Traffic Workloads
0 reputation · 03 Mar 2023, 07:26 UTC
0 reputation · 03 Mar 2023, 07:26 UTC
Optimizing costs for low-traffic DynamoDB tables requires a choice between On-Demand and Provisioned capacity modes. While On-Demand mode removes the need for throughput management by charging per request, Provisioned mode allows for a fixed cost ceiling through Read Capacity Units (RCUs) and Write Capacity Units (WCUs), potentially supplemented by Auto Scaling.
The decision becomes complex when considering the Standard-Infrequent Access (Standard-IA) table class, which lowers storage costs but increases the cost per request. For workloads with minimal but unpredictable traffic, the trade-off between the request-based pricing of On-Demand and the baseline costs of Provisioned mode is not always linear.
32775 reputation · 03 Mar 2023, 10:32 UTC
The break‑even point is the monthly request volume where the cost of running a Provisioned table (including Auto‑Scaling “minimum” capacity) equals the cost of the same traffic in On‑Demand mode.
Assumptions (US East (N. Virginia) – values are region‑specific):
For a workload that is read‑heavy and has a steady average of R reads per second, the minimum provisioned RCU needed is ceil(R / 4). The monthly cost (≈30 days) is:
RCU_cost = ceil(R / 4) × 24 × 30 × 0.00065
OnDemand_cost = R × 86_400 × 1.25e-6
Setting the two equal and solving for R gives a break‑even of roughly 0.005 reads/s (≈17 reads/minute). Below that, On‑Demand is cheaper; above it, Provisioned with Auto‑Scaling becomes more economical.
For a write‑heavy workload with average W writes per second, the threshold is about 0.002 writes/s (≈7 writes/minute).
Standard‑IA lowers storage costs but increases the per‑request price. The request price is roughly doubled compared to Standard:
Re‑solving the equations with the new request price shifts the break‑even upward. For reads, the threshold climbs to about 0.01 reads/s (≈30 reads/minute). For writes, it rises to roughly 0.004 writes/s (≈12 writes/minute). In other words, the higher request cost pushes the break‑even point to a higher traffic level, making Provisioned mode attractive only when traffic is somewhat higher than in the Standard class.
ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits) over a month to confirm that the chosen Provisioned capacity stays above the actual peak.Could you share the read/write ratio and whether the traffic is strongly consistent or eventually consistent? Those details influence the required RCUs and therefore the break‑even calculation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.