Question

Difficulty: HardCost-Optimized Database Design and Capacity Planning

A logistics company runs a fleet tracking application that records real-time telemetry data from delivery vehicles in an Amazon DynamoDB table. The write workload is highly variable. During standard weekday operations, the table experiences a steady, predictable baseline of 300 writes/second300\text{ writes/second}. However, during a daily 30-minute30\text{-minute} synchronization window that occurs at random times depending on fleet arrivals, regional depots upload batch telemetry data, causing write traffic to spike instantly to 6,000 writes/second6,000\text{ writes/second}. The application requires immediate data visibility and cannot tolerate any write throttling or data loss. Which capacity planning strategy is the most cost-effective and meets the performance requirements?

  1. A
    Configure the DynamoDB table with provisioned capacity mode, enabling Auto Scaling with a minimum write capacity of 300300 and a maximum of 6,0006,000.
  2. Configure the DynamoDB table to use on-demand capacity mode.Answer
  3. C
    Configure the DynamoDB table with provisioned capacity mode statically set to 6,0006,000 write capacity units, and purchase a Compute Savings Plan to reduce the cost of the provisioned write capacity.
  4. D
    Migrate the telemetry database to Amazon RDS for PostgreSQL, deploying a single primary DB instance with a read replica in a different Availability Zone, and direct the application to write to the read replica if the primary instance experiences performance issues.

Answer

Configure the DynamoDB table to use on-demand capacity mode.
Configuring the DynamoDB table to use on-demand capacity mode is the most cost-effective and reliable solution. On-demand mode handles sudden, unpredictable spikes in write traffic instantly without throttling, and only charges for the actual reads and writes consumed. This avoids the cost of statically provisioning for the peak (6,000 writes/second6,000\text{ writes/second}) while meeting the strict requirement of no data loss or throttling.

Step-by-Step Solution

1
Analyze the workload characteristics and performance requirements.
Identify that the baseline is 300 writes/second300\text{ writes/second}, the peak is 6,000 writes/second6,000\text{ writes/second} (occurring instantly and at random times), and write throttling or data loss cannot be tolerated.
Understanding the workload constraints is necessary to select the correct capacity mode.
2
Evaluate the suitability of DynamoDB Auto Scaling for this workload.
Determine that Auto Scaling is not suitable because it cannot scale instantly from 300300 to 6,000 writes/second6,000\text{ writes/second}, leading to throttling.
Auto Scaling relies on trailing CloudWatch metrics and has a reaction delay of several minutes.
3
Evaluate the cost-efficiency of static provisioning vs. on-demand capacity mode.
Statically provisioning 6,000 WCUs6,000\text{ WCUs} is highly expensive and wasteful. On-demand capacity mode scales instantly and charges only for consumed capacity, which is cheaper and safer.
On-demand mode eliminates both the risk of throttling during random spikes and the high cost of overprovisioning.

Key Concept

DynamoDB On-Demand vs. Provisioned Capacity Auto Scaling for unpredictable workloads
Rate this question