Amazon DynamoDB Read / Write Capacity Modes - Overview.
Scope:
- Intro,
- Provisioned Capacity Mode,
- On-Demand Capacity Mode,
- Best for predictable workloads.
- When to use what,
- Key Differences Table,
- Key takeaway.
Intro:
- In Amazon DynamoDB, Read/Write Capacity Modes determine how twtech pays for throughput and how DynamoDB allocates resources to serve its reads and writes attributes.
- There are two main modes , plus an optional on-demand backup/restore & autoscaling layer that can be added on top.
1. Provisioned Capacity Mode
- twtech explicitly configures how many read and write units it wants for the table (or GSI).
Best for predictable
workloads.
- Read Capacity Units (RCUs) → 1 strongly consistent read per second for an item up
to 4 KB, or 2 eventually consistent reads per second for 4 KB.
- Write Capacity Units (WCUs) → 1 write per second for an item up to 1 KB.
- Auto Scaling (optional) → DynamoDB can automatically adjust RCUs/WCUs based on
load.
- Over-provision risk
→ twtech might pay for unused capacity if traffic is lower than expected.
- Under-provision risk
→ twtech may get throttled if requests exceed provisioned RCUs/WCUs.
When to use:
- Predictable traffic patterns, steady baseline with occasional spikes handled by auto scaling.
2. On-Demand Capacity Mode
- twtech doesn’t predefine RCUs/WCUs.
- DynamoDB instantly accommodates the workload.
- twtech pay per request:
- Read request units (RRUs)
- Write request units (WRUs)
- Instantly scales up and down with traffic.
- No throttling (except in rare, extreme, sustained
spikes).
- No need to manage capacity settings.
- Typically more expensive at high sustained
throughput than provisioned.
When to use:
- Unpredictable traffic, new apps without a baseline, or dev/test workloads.
Key Differences Table
|
Feature |
Provisioned Capacity |
On-Demand Capacity |
|
Billing model. |
Pay per RCU/WCU provisioned per
hour |
Pay per request (RRU/WRU) |
|
Scaling. |
Manual or auto-scaling |
Fully automatic |
|
Best for. |
Predictable workloads |
Unpredictable workloads |
|
Throttling. |
Possible if exceed provision |
Rare; only on extreme spikes |
|
Price predictability. |
High (fixed hourly rate) |
Variable (depends on requests) |
Insights:
- twtech can switch between modes once every 24 hours per table (but GSIs follow the table’s mode).
- Also, a table’s mode applies to all indexes on it.
Key takeaway:
- Provisioned mode - has a fixed throughput meter — once it’s full, extra requests get throttled (blocked) unless twtech has set auto-scaling.
- On-Demand mode - is like a stretchy pipeline that adjusts instantly to the flow, billing per operation.
No comments:
Post a Comment