Soru

Zorluk: OrtaCost-Optimized Database Design and Capacity Planning

A startup is developing a mobile application to track real-time delivery status updates. The application experiences highly unpredictable spikes in usage, reaching up to 5,000 writes per second5,000\text{ writes per second} during lunch and dinner hours, and dropping to near zero overnight. The data structure is simple key-value pairs representing the delivery ID and its status. The startup has a strict budget and wants to minimize operational and storage costs while preventing database throttling. Which database configuration meets these requirements most cost-effectively?

  1. Amazon DynamoDB configured in On-Demand capacity mode.Cevap
  2. B
    Amazon DynamoDB configured in Provisioned capacity mode with Auto Scaling enabled.
  3. C
    Amazon RDS for PostgreSQL with a Read Replica in another Availability Zone to serve as the automatic failover target.
  4. D
    Amazon DynamoDB configured with high Provisioned capacity and a partition key based on the delivery date.

Cevap

Amazon DynamoDB configured in On-Demand capacity mode.
The correct option is the choice stating that DynamoDB should be configured in On-Demand capacity mode. This mode is the most cost-effective solution for workloads that are highly unpredictable, experience sudden spikes, and have long idle periods. With on-demand capacity, the startup pays only for the read and write requests actually executed. It scales up or down instantly to handle spikes up to the table's previous peak traffic, completely avoiding throttling without the need to overprovision capacity.

Adım Adım Çözüm

1
Analyze the application workload characteristics and data structure.
The workload is highly unpredictable with sudden spikes (up to 5,000 writes per second5,000\text{ writes per second}) and long idle periods (near zero writes). The data structure is simple key-value pairs (delivery ID and status).
Identifying the access pattern and load profiles helps narrow down the suitable database engine and capacity planning strategies.
2
Select the database engine.
Amazon DynamoDB is chosen because it is a managed NoSQL database designed for key-value storage with low latency and high scalability.
Using a relational database like RDS for a simple key-value workload is operationally complex and less cost-effective.
3
Determine the cost-optimal capacity mode.
On-Demand capacity mode is selected.
On-demand capacity mode handles sudden, unpredictable spikes instantly without throttling and charges only for actual usage, making it much more cost-effective than provisioning for the peak or waiting for auto-scaling to react.

Anahtar Kavram

Matching database capacity scaling modes to unpredictable, spiky workloads to optimize costs.
Bu soruyu puanla