Soru

Zorluk: OrtaCost-Optimized Database Design and Capacity Planning

A startup is developing a restaurant table booking application. The application experiences highly irregular and unpredictable traffic spikes when popular restaurants open their reservation windows, followed by hours of low activity. The database must store the reservation records with single-digit millisecond latency. Which database configuration is the most cost-effective to meet these requirements?

  1. Configure an Amazon DynamoDB table using On-Demand capacity mode.Cevap
  2. B
    Configure an Amazon DynamoDB table using Provisioned capacity mode with Auto Scaling, setting the minimum provisioned write capacity to the peak historical load.
  3. C
    Deploy an Amazon RDS for PostgreSQL database instance in a single Availability Zone and configure a Read Replica in a different Availability Zone to serve as the automatic failover destination.
  4. D
    Deploy an Amazon RDS for PostgreSQL database instance and purchase a Compute Savings Plan to cover the hourly database compute costs.

Cevap

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. On-Demand mode is designed for workloads with unpredictable or spiky traffic patterns because it automatically accommodates bursts of traffic without the need to provision capacity in advance. Since charges are based only on the actual read and write requests processed, the startup avoids paying for idle resources during low-activity hours.

Adım Adım Çözüm

1
Analyze the workload's performance and traffic pattern.
The application requires low latency (single-digit millisecond) and experiences highly irregular, unpredictable traffic spikes followed by long idle periods.
Understanding the latency requirement and traffic pattern is necessary to choose the appropriate database engine and capacity planning model.
2
Evaluate the target database engine alternatives.
Amazon DynamoDB is selected because it natively supports single-digit millisecond latency, whereas Amazon RDS PostgreSQL requires more management overhead and does not natively offer the same scaling speed.
Choosing the correct database service prevents over-provisioning and ensures latency requirements are met.
3
Select the optimal capacity mode for the chosen database engine.
On-Demand capacity mode for DynamoDB is selected because it automatically scales instantly to handle unpredictable spikes and charges only for active requests, resulting in zero idle capacity costs.
On-demand billing aligns database costs directly with actual application usage, optimizing costs for spiky workloads.

Anahtar Kavram

Matching database capacity models (On-Demand vs. Provisioned) and services to unpredictable, spiky workloads to achieve cost optimization.
Bu soruyu puanla