Search⌘ K
AI Features

DynamoDB Capacity and Scaling

Understand how to plan and manage DynamoDB capacity by exploring on-demand and provisioned modes. Learn about auto scaling mechanisms, burst capacity credits, and how to avoid hot partitions. Master the calculations for read and write capacity units to optimize costs and performance for scalable applications.

In the previous lesson on secondary indexes, every additional GSI or LSI introduced extra write cost because DynamoDB must propagate changes to each index structure. That write amplification raises an immediate question: how does DynamoDB allocate and manage the throughput that those writes consume? The answer lies in capacity planning, and getting it wrong leads to throttled requests, inflated bills, or both.

DynamoDB is engineered to deliver single-digit-millisecond latency at virtually any scale, but that promise depends on selecting the right capacity configuration for your workload. Two capacity modes govern how throughput is allocated. On-demand mode is the default and automatically accommodates traffic fluctuations without any upfront throughput settings. Provisioned mode requires the operator to declare explicit read and write capacity, providing tighter cost control at the expense of manual planning.

This lesson explains on-demand and provisioned capacity modes, then examines how auto scaling works for provisioned capacity, the partition-level limits and access patterns that can create hot partitions, and the read and write request unit calculations that drive capacity planning, cost estimates, and performance expectations.

On-demand vs. provisioned mode

On-demand mode bills per request rather than per hour of provisioned capacity. When a traffic spike arrives, DynamoDB allocates additional throughput behind the scenes, so the application does not need to predict or preset capacity values. This makes on-demand a natural fit for variable, unpredictable, or brand-new workloads where traffic patterns have not been established. DynamoDB tracks the previous peak traffic level for an on-demand table and can accommodate up to double that peak within approximately 30 minutes, scaling further as sustained demand grows.

Provisioned ...