Soru

Zorluk: OrtaCost-Optimized Database Design and Capacity Planning

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 15 minutes15\text{ minutes}. During a ticket release, write throughput spikes to 6,000 write operations per second6,000\text{ write operations per second}, while the off-peak average is less than 10 writes per second10\text{ writes per second}. The database must automatically handle these traffic spikes and tolerate Availability Zone failures. Which database configuration is the most cost-effective for this workload?

  1. A
    Configure an Amazon DynamoDB table using Provisioned capacity mode with the write capacity permanently set to 6,0006,000 Write Capacity Units (WCUs).
  2. Configure an Amazon DynamoDB table using On-Demand capacity mode.Cevap
  3. C
    Configure an Amazon DynamoDB table using Provisioned capacity mode, and purchase a Compute Savings Plan to lower the hourly cost of the provisioned capacity.
  4. D
    Deploy 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.

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. 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.

Adım Adım Çözüm

1
Analyze the workload characteristics and requirements.
The workload uses a key-value data structure, requires high write throughput up to 6,000 writes per second6,000\text{ writes per second} during rare spikes, averages less than 10 writes per second10\text{ writes per second} off-peak, and needs high availability across Availability Zones.
Understanding the access patterns and scaling needs is the first step in cost-optimized capacity planning.
2
Select the appropriate database engine and scaling mode.
Amazon DynamoDB is a managed NoSQL database that offers native key-value storage and Multi-AZ availability. On-Demand capacity mode scales instantly to handle spikes and charges only for actual read/write requests, making it cost-optimal for highly spiky, low-average workloads.
Comparing pricing models of on-demand versus provisioned capacity helps determine the lowest-cost configuration.
3
Evaluate and eliminate less cost-efficient or invalid alternatives.
Provisioned capacity causes expensive idle resource waste. Compute Savings Plans cannot be applied to DynamoDB. Amazon RDS with a Read Replica does not support automatic failover and is less cost-effective for simple key-value session storage.
Ensuring the selected solution is valid and offers the lowest operational and resource cost.

Anahtar Kavram

Selecting the most cost-effective database capacity mode (On-Demand vs. Provisioned) based on workload predictability and spikiness.
Bu soruyu puanla