Question

Difficulty: HardCost-Optimized Database Design and Capacity Planning

A company is designing the database tier for a new web application. The application stores user session states and profiles. The workload is highly variable and unpredictable, experiencing sudden, irregular traffic spikes of up to 8,0008,000 read operations per second and 4,0004,000 write operations per second, followed by several hours of complete inactivity. The company has a strict budget and wants to minimize operational costs while preventing database throttling during traffic spikes. Which database configuration is the most cost-effective for this workload?

  1. Amazon DynamoDB configured in On-Demand capacity modeAnswer
  2. B
    Amazon DynamoDB configured in Provisioned capacity mode with DynamoDB Auto Scaling enabled, setting the minimum capacity to 100100 Read Capacity Units (RCUs) and 5050 Write Capacity Units (WCUs)
  3. C
    Amazon DynamoDB configured in Provisioned capacity mode with a constant provisioned capacity of 8,0008,000 RCUs and 4,0004,000 WCUs
  4. D
    An Amazon RDS for MySQL DB instance configured in a Multi-AZ deployment, using Read Replicas in separate Availability Zones as the primary disaster recovery failover targets

Answer

Amazon DynamoDB configured in On-Demand capacity mode
The correct answer is configuring Amazon DynamoDB in On-Demand capacity mode. Because the workload is highly variable and unpredictable with long periods of complete inactivity, paying only for the actual read and write requests aligns perfectly with cost optimization. DynamoDB On-Demand scales instantly to accommodate spikes up to the table's previous peak traffic, ensuring zero throttling without paying for idle capacity.

Step-by-Step Solution

1
Analyze workload characteristics
The workload is highly variable, unpredictable, has sudden peaks (8,0008,000 reads/sec, 4,0004,000 writes/sec), and experiences long periods of complete inactivity.
Understanding the traffic patterns is key to choosing between provisioned and serverless/on-demand capacity models.
2
Evaluate DynamoDB capacity options
On-demand capacity mode charges only for requests made and scales instantly. Provisioned capacity mode with auto-scaling is too slow to react to sudden spikes and incurs costs during idle times. Constant provisioned capacity is prohibitively expensive due to over-provisioning.
This determines the most cost-effective DynamoDB scaling option that also prevents throttling.
3
Evaluate Amazon RDS option
RDS instances run continuously and incur static hourly costs even during idle periods. Read Replicas do not solve the write scaling problem and cannot act as synchronous failover targets.
This rules out relational database alternatives that fail either cost-efficiency or failover requirements.
4
Select the optimal database design
Amazon DynamoDB configured in On-Demand capacity mode is the correct choice.
It offers instant scaling for sudden spikes and zero cost when idle.

Key Concept

Selecting the cost-optimal database capacity mode for highly unpredictable workloads with idle periods.
Estimated Time:2m 0s
Rate this question