Google News
logo
DynamoDB - Interview Questions
Can you explain the concepts of on-demand and provisioned capacity modes?
In Amazon DynamoDB, on-demand and provisioned capacity modes are two different options for managing throughput capacity for tables. These capacity modes offer flexibility in how users provision and pay for read and write throughput capacity based on their application requirements.

Provisioned Capacity Mode :
* Provisioned capacity mode is the traditional way of provisioning throughput capacity for DynamoDB tables.
* In this mode, users specify the desired number of read capacity units (RCUs) and write capacity units (WCUs) when creating or updating a table.
* Users prepay for the provisioned capacity, regardless of the actual usage. They are billed based on the provisioned throughput capacity, regardless of whether the capacity is fully utilized.
* Provisioned capacity mode is suitable for applications with predictable and consistent workloads where the throughput requirements can be estimated in advance.
* Users can manually adjust the provisioned throughput capacity as needed to accommodate changes in workload patterns. DynamoDB also offers auto scaling, a feature that automatically adjusts throughput capacity based on actual usage.

On-Demand Capacity Mode :
* On-demand capacity mode is a flexible and pay-as-you-go option for provisioning throughput capacity in DynamoDB tables.
* In this mode, users do not need to specify or prepay for provisioned throughput capacity. Instead, DynamoDB automatically scales capacity based on actual usage.
* Users are billed for the read and write capacity consumed by their table on a per-request basis, with no minimum fees or long-term commitments.
* On-demand capacity mode is suitable for applications with unpredictable or variable workloads where the throughput requirements can fluctuate significantly over time.
* With on-demand capacity mode, users do not need to manually manage throughput capacity or worry about over-provisioning or under-provisioning. DynamoDB automatically scales capacity up or down based on the workload demands.
Advertisement