An online ticketing platform experiences extreme spikes in database writes during ticket release events for major concerts, which occur once or twice a month. For the rest of the month, database traffic is negligible. The platform uses a key-value data structure to temporarily store seat reservation sessions for up to . During a ticket release, write throughput spikes to , while the off-peak average is less than . The database must automatically handle these traffic spikes and tolerate Availability Zone failures. Which database configuration is the most cost-effective for this workload?
- AConfigure an Amazon DynamoDB table using Provisioned capacity mode with the write capacity permanently set to Write Capacity Units (WCUs).
- Configure an Amazon DynamoDB table using On-Demand capacity mode.Answer
- CConfigure an Amazon DynamoDB table using Provisioned capacity mode, and purchase a Compute Savings Plan to lower the hourly cost of the provisioned capacity.
- DDeploy an Amazon RDS for PostgreSQL DB instance with a Read Replica in a separate Availability Zone, and configure the application to failover automatically to the replica.
Answer
Configure an Amazon DynamoDB table using On-Demand capacity mode.
The correct option is to configure an Amazon DynamoDB table using On-Demand capacity mode. This mode is designed for workloads with unpredictable or highly spiky traffic, as it scales instantly to accommodate requests up to the table's partition limits. Since charges are based strictly on the actual read and write request units consumed, it eliminates the cost of provisioning idle resources during off-peak times, making it the most cost-effective choice for this pattern.
Step-by-Step Solution
Key Concept
Selecting the most cost-effective database capacity mode (On-Demand vs. Provisioned) based on workload predictability and spikiness.