Soru

Zorluk: OrtaCost-Optimized Database Design and Capacity Planning

A startup is launching a mobile game that stores user profile data. The game's traffic is highly unpredictable and spiky, with writes to the database increasing from 100 writes per second to over 12,000 writes per second within minutes when popular influencers stream the game. Outside of these events, traffic is minimal. The database must be highly available and scale automatically to handle these sudden spikes. Which database configuration meets these requirements most cost-effectively?

  1. Amazon DynamoDB configured in on-demand capacity modeCevap
  2. B
    Amazon DynamoDB configured in provisioned capacity mode with Auto Scaling enabled
  3. C
    Amazon RDS for MySQL in a Single-AZ deployment, utilizing a Read Replica in a different Availability Zone as the primary automated failover target to handle database recovery and accommodate write traffic spikes
  4. D
    Amazon DynamoDB configured in provisioned capacity mode with Write Capacity Units (WCUs) statically provisioned at 12,000

Cevap

Amazon DynamoDB configured in on-demand capacity mode
The correct answer is the option proposing Amazon DynamoDB in on-demand capacity mode. For highly unpredictable workloads with sudden, massive spikes followed by periods of inactivity, DynamoDB on-demand capacity mode is the most cost-effective choice. It scales automatically and instantly to accommodate write spikes up to 12,000 writes per second and incurs no charges when the database is idle, charging only for actual read and write requests.

Adım Adım Çözüm

1
Analyze workload characteristics
The workload has extreme write spikes (from 100 to 12,000 writes/sec) that occur rapidly (within minutes) and are highly unpredictable, with long periods of idle time.
Understanding the traffic pattern is critical to choosing the correct database capacity model.
2
Evaluate DynamoDB on-demand capacity mode against the workload profile
On-demand capacity mode instantly scales to accommodate sudden, unpredictable spikes in traffic and charges only for the actual requests consumed, making it highly cost-optimized for this pattern.
This mode avoids paying for idle resources while ensuring the database does not throttle during sudden spikes.
3
Compare with alternative configurations
Provisioned capacity with Auto Scaling cannot scale up quickly enough to handle sudden spikes from 100 to 12,000 writes per second, leading to database throttling. Statically provisioning for peak load is extremely expensive and wasteful during idle periods. Single-AZ RDS with a Read Replica is not a valid automated high availability option and cannot scale writes dynamically.
Confirming why the other options fail to meet the cost and performance requirements.

Anahtar Kavram

Selecting the optimal database capacity mode (on-demand vs. provisioned) based on workload predictability and scaling velocity to minimize cost while maintaining performance.
Tahmini Süre:1m 30s
Bu soruyu puanla