A solutions architect is designing the database tier for an e-commerce platform that hosts short-duration flash sales events. During these events, write traffic spikes suddenly from a few requests per minute to over transactions per second. The application requires database write latency of less than milliseconds. The orders are processed using sequentially generated order IDs. Which database configuration will meet these performance requirements under sudden spikes while remaining cost-effective?
- ADeploy an Amazon DynamoDB table in on-demand capacity mode, using the sequentially generated order ID as the partition key to preserve the order sequence.
- BDeploy an Amazon RDS for MySQL database in a single Availability Zone, and configure three read replicas in different Availability Zones to handle the high write throughput and serve as primary failover targets.
- Deploy an Amazon DynamoDB table in on-demand capacity mode, and design the partition key using a high-cardinality attribute such as a UUID or a hashed combination of the order ID and timestamp.Cevap
- DDeploy an Amazon DynamoDB table with a UUID partition key in provisioned capacity mode, using static write capacity units calculated based on the average daily traffic to minimize operating costs.
Cevap
Deploy an Amazon DynamoDB table in on-demand capacity mode, and design the partition key using a high-cardinality attribute such as a UUID or a hashed combination of the order ID and timestamp.
The correct architecture uses Amazon DynamoDB in on-demand capacity mode with a partition key designed around a high-cardinality attribute (like a UUID or hashed key). DynamoDB easily delivers sub- millisecond write latencies. On-demand mode dynamically adjusts to sudden, unpredictable traffic spikes without manual scaling or throttling. Using a high-cardinality partition key distributes write operations evenly across physical partitions, avoiding write bottlenecks.
Adım Adım Çözüm
Anahtar Kavram
High-Performing DynamoDB Partitioning and Capacity Planning