0
0
DynamoDBquery~10 mins

Table capacity modes (on-demand vs provisioned) in DynamoDB - Visual Side-by-Side Comparison

Choose your learning style9 modes available
Concept Flow - Table capacity modes (on-demand vs provisioned)
Start
Choose Capacity Mode
On-Demand Mode
Auto scales
Pay per request
Handle Traffic
End
You start by choosing a capacity mode: on-demand auto-scales and charges per request, while provisioned requires setting fixed read/write units and paying for them.
Execution Sample
DynamoDB
CREATE TABLE MyTable (
  id STRING HASH KEY
) CAPACITY_MODE ON_DEMAND;
This creates a DynamoDB table with on-demand capacity mode, which automatically adjusts to traffic.
Execution Table
StepActionCapacity ModeRead Capacity Units (RCU)Write Capacity Units (WCU)BillingResult
1Create table with ON_DEMAND modeON_DEMANDAutoAutoPay per requestTable created with on-demand capacity
2Traffic increasesON_DEMANDAuto scales upAuto scales upCharges increase with usageCapacity adjusts automatically
3Traffic decreasesON_DEMANDAuto scales downAuto scales downCharges decrease with usageCapacity adjusts automatically
4Create table with PROVISIONED modePROVISIONED55Pay fixed unitsTable created with fixed capacity
5Traffic increases beyond capacityPROVISIONED55May throttle requestsPerformance may degrade
6Manually increase capacityPROVISIONED1010Pay fixed unitsCapacity increased manually
7Traffic normalizesPROVISIONED1010Pay fixed unitsCapacity remains fixed until changed
8End----Execution ends
💡 Execution ends after showing both modes handling traffic and billing differences.
Variable Tracker
VariableStartAfter Step 2After Step 3After Step 5After Step 6Final
Capacity ModeNot setON_DEMANDON_DEMANDPROVISIONEDPROVISIONEDPROVISIONED
Read Capacity Units (RCU)N/AAuto scales upAuto scales down51010
Write Capacity Units (WCU)N/AAuto scales upAuto scales down51010
BillingN/APay per requestPay per requestPay fixed unitsPay fixed unitsPay fixed units
Key Moments - 3 Insights
Why does on-demand mode not require setting read/write units?
Because on-demand mode automatically adjusts capacity based on traffic, as shown in execution_table rows 1-3 where capacity scales up and down without manual input.
What happens if traffic exceeds provisioned capacity?
Requests may be throttled causing performance issues, as seen in execution_table row 5 where fixed capacity is insufficient for increased traffic.
Does provisioned mode automatically reduce capacity when traffic decreases?
No, provisioned capacity stays fixed until manually changed, shown in rows 6-7 where capacity remains at 10 units despite traffic normalization.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what billing method is used in step 2 for on-demand mode?
APay fixed units
BPay per request
CFree
DSubscription
💡 Hint
Check the 'Billing' column in execution_table row 2.
At which step does provisioned mode capacity get manually increased?
AStep 6
BStep 5
CStep 4
DStep 7
💡 Hint
Look at the 'Action' column describing capacity changes in execution_table.
If traffic decreases in on-demand mode, what happens to capacity according to variable_tracker?
ACapacity stays the same
BCapacity increases
CCapacity decreases automatically
DCapacity must be manually adjusted
💡 Hint
See 'Read Capacity Units (RCU)' and 'Write Capacity Units (WCU)' changes after Step 3 in variable_tracker.
Concept Snapshot
DynamoDB tables have two capacity modes:
- On-Demand: Auto scales read/write capacity, pay per request.
- Provisioned: Set fixed read/write units, pay fixed cost.
On-Demand suits unpredictable traffic.
Provisioned suits steady, predictable workloads.
Choose mode based on traffic pattern and cost control.
Full Transcript
This visual execution shows how DynamoDB table capacity modes work. You start by choosing either on-demand or provisioned mode. On-demand mode automatically adjusts capacity units based on traffic, charging you per request. Provisioned mode requires you to set fixed read and write capacity units, paying a fixed cost regardless of usage. If traffic exceeds provisioned capacity, requests may be throttled until you manually increase capacity. On-demand mode scales capacity up and down automatically as traffic changes. This helps you understand billing differences and performance impacts between the two modes.