Soru

Zorluk: OrtaHigh-Performing Database Solutions

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 12,00012,000 transactions per second. The application requires database write latency of less than 1010 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?

  1. A
    Deploy an Amazon DynamoDB table in on-demand capacity mode, using the sequentially generated order ID as the partition key to preserve the order sequence.
  2. B
    Deploy 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.
  3. 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
  4. D
    Deploy 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-1010 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

1
Analyze the performance requirements: high write throughput (12,00012,000 writes per second), sub-1010 millisecond latency, and sudden spikes in traffic.
DynamoDB is identified as the database capable of meeting sub-1010 millisecond write latencies at scale, while on-demand capacity mode is required to handle sudden, unpredictable spikes without throttling.
To select the database service and capacity management strategy that matches the throughput and performance constraints.
2
Analyze the partition key design based on the access patterns and sequentially generated order IDs.
Using sequential keys would direct consecutive writes to the same partition, causing a hot partition. A high-cardinality partition key, such as a UUID or hashed order ID, is required to distribute writes evenly.
To avoid partition throttling and ensure high write throughput is distributed across the database nodes.
3
Evaluate the suitability of relational databases with read replicas.
Relational read replicas do not accept write operations and cannot resolve write bottlenecks. Manual failover scripts on read replicas do not replace the automated failover capability of Multi-AZ.
To eliminate architectures that cannot scale write performance or provide automated resilience.

Anahtar Kavram

High-Performing DynamoDB Partitioning and Capacity Planning
Bu soruyu puanla