0
0
DynamoDBquery~3 mins

Table capacity modes (on-demand vs provisioned) in DynamoDB - When to Use Which

Choose your learning style9 modes available
The Big Idea

What if your database could magically handle any traffic without you lifting a finger?

The Scenario

Imagine you run a small online store and you keep track of orders using a simple spreadsheet. When many customers buy at once, the spreadsheet slows down or crashes because it can't handle the sudden rush.

The Problem

Manually guessing how many orders will come in each hour is hard. If you guess too low, your system gets overwhelmed and slows down. If you guess too high, you waste money paying for unused capacity. This guessing game is stressful and error-prone.

The Solution

Table capacity modes let you choose how your database handles traffic. With on-demand, it automatically adjusts to traffic spikes without you worrying. With provisioned, you set the capacity ahead, which can save money if traffic is steady. This way, your system stays fast and cost-effective.

Before vs After
Before
Set capacity units manually and monitor constantly.
After
Use 'on-demand' mode to auto-scale or 'provisioned' mode to pre-set capacity easily.
What It Enables

You can focus on growing your app while your database smoothly handles any traffic, big or small.

Real Life Example

A ticket booking app uses on-demand mode during a popular concert sale to handle sudden huge traffic without crashing or delays.

Key Takeaways

Manual capacity planning is hard and risky.

On-demand mode auto-scales with traffic spikes.

Provisioned mode lets you save costs with steady traffic.