DynamoDB Capacity Modes

DynamoDB uses a concept called capacity to manage how much read and write throughput your table can handle per second. You choose between two capacity modes: Provisioned and On-Demand. The right choice depends on your traffic patterns and cost priorities.

Read Capacity Units and Write Capacity Units

Before exploring modes, you need to understand how DynamoDB measures work:

  • Read Capacity Unit (RCU): One strongly consistent read of one item up to 4 KB per second. One eventually consistent read costs 0.5 RCU.
  • Write Capacity Unit (WCU): One write of one item up to 1 KB per second.

If an item is 8 KB, reading it strongly costs 2 RCUs. Writing it costs 8 WCUs.

Mode 1: Provisioned Capacity

You tell DynamoDB in advance how many RCUs and WCUs you need per second. DynamoDB reserves that exact amount of throughput for your table. If your traffic exceeds this limit, DynamoDB throttles the extra requests.

Example Setup

Table: Products
  Provisioned Read Capacity:  100 RCUs/second
  Provisioned Write Capacity:  20 WCUs/second

Normal Traffic (100 reads/sec, 15 writes/sec) → Works fine
Spike (500 reads/sec) → First 100 succeed, 400 are throttled → Error: ProvisionedThroughputExceededException

Auto Scaling

DynamoDB Auto Scaling watches your table's traffic and automatically adjusts provisioned capacity up or down between a minimum and maximum you define. It does not react instantly — it takes a few minutes to scale. Short traffic spikes may still cause throttling before the scale-up completes.

You set: Min 50 RCUs, Max 500 RCUs, Target 70% utilization

Traffic rises from 50 to 300 reads/sec:
  DynamoDB detects >70% utilization
  Auto Scaling triggers → increases capacity to ~430 RCUs
  Scale-up completes in ~5 minutes
  During those 5 minutes, some requests may throttle

Burst Capacity

DynamoDB retains unused capacity for up to 5 minutes and lets you use it as a burst buffer for sudden spikes. If your table normally uses 30 RCUs of its 100 RCU provisioned capacity, the unused 70 RCUs accumulate. A sudden spike can briefly use up to 300 RCUs (5 minutes × 70 unused RCUs).

Pricing in Provisioned Mode

You pay for the capacity you provision, whether you use it or not. It is like paying monthly rent — you pay the full amount even if the table sits idle for half the day. This mode is cheaper at consistent, predictable loads.

Mode 2: On-Demand Capacity

On-Demand mode requires no capacity planning. DynamoDB automatically handles any traffic level and scales instantly. You pay per request instead of per hour of reserved capacity.

How It Works

Traffic at 8 AM:  50 reads/sec  → DynamoDB handles it
Traffic at 12 PM: 5,000 reads/sec → DynamoDB handles it (same performance)
Traffic at 11 PM: 10 reads/sec  → DynamoDB handles it

No configuration. No throttling. No capacity settings.

Pricing in On-Demand Mode

You pay per million read request units and per million write request units consumed. There is no charge for idle time. If your table gets no traffic for a day, you pay nothing for that day.

Side-by-Side Comparison

FeatureProvisioned ModeOn-Demand Mode
Capacity planningRequiredNot required
Scales to spikesWith delay (Auto Scaling)Instantly
Throttling possibleYesNo (within AWS limits)
Pay for idle capacityYesNo
Cost at high steady loadLowerHigher
Cost at unpredictable/low loadHigher (wasted capacity)Lower
Best forStable, predictable trafficNew apps, spiky, or variable traffic

Switching Between Modes

You can switch a table from On-Demand to Provisioned (or vice versa) once every 24 hours. This lets you start with On-Demand while your app is new and unpredictable, then switch to Provisioned once your traffic patterns stabilize and you can forecast capacity.

Diagram: Cost Comparison Scenario

App Traffic Pattern:
  Mon–Fri: 1,000 reads/sec (work hours), near-zero overnight
  Weekend: Occasional bursts to 5,000 reads/sec

Provisioned (set at 5,000 RCUs to handle weekends):
  Cost: pays for 5,000 RCUs × 24hrs × 7 days
  Most of Mon–Fri night: 4,900 RCUs sit idle — you pay for them anyway

On-Demand:
  Cost: pays only for actual reads consumed
  Mon–Fri nights: near zero cost
  Weekend bursts: handled without throttling, billed at burst volume

Conclusion: On-Demand is likely cheaper and simpler for this pattern

Reserved Capacity

For Provisioned mode, AWS offers Reserved Capacity purchases — you commit to using a minimum capacity level for 1 or 3 years in exchange for a discount of up to 76% compared to on-demand pricing. This is suitable for mature, high-traffic production tables with very predictable load.

Choosing the Right Mode

SituationRecommended Mode
New application, unknown trafficOn-Demand
Application with very steady trafficProvisioned + Auto Scaling
Large sale events (sudden spikes)On-Demand
Dev/test environmentsOn-Demand (no wasted idle cost)
High-volume, cost-sensitive productionProvisioned + Reserved Capacity

Summary

  • Provisioned mode: you set RCUs and WCUs; cheaper at steady loads; can throttle at spikes.
  • On-Demand mode: no configuration; scales instantly; more expensive at high steady loads.
  • Auto Scaling helps Provisioned mode handle gradual traffic changes but not sudden spikes.
  • You can switch modes once every 24 hours.

Leave a Comment

Your email address will not be published. Required fields are marked *