Soru

Zorluk: OrtaHigh-Performing Database Solutions

A sports media website uses an Amazon DynamoDB table to store live commentary updates for popular matches. During major tournaments, write volume spikes to 15,00015,000 writes per second. The application requires sub-millisecond read latency for the most active match commentary threads. Currently, the database partition key is a combination of the tournament name and a sequential timestamp (TournamentName_Timestamp). During peak events, the application experiences write throttling and elevated latency. Which configuration should a solutions architect implement to resolve the performance bottlenecks and meet the latency requirements?

  1. Redesign the partition key using a high-cardinality attribute like a hashed combination of MatchID and CommentaryID, and deploy Amazon DynamoDB Accelerator (DAX) to serve reads.Cevap
  2. B
    Keep the existing TournamentName_Timestamp partition key to maintain chronological ordering, and deploy DynamoDB Accelerator (DAX) to handle the write cache.
  3. C
    Migrate the database layer to Amazon RDS for PostgreSQL, utilizing a single primary instance with multiple Read Replicas configured as the primary failover targets to achieve high performance and immediate disaster recovery.
  4. D
    Maintain the current DynamoDB table structure but configure the table with Provisioned Capacity Mode using static read and write capacity settings set to the historical average to prevent throttling.

Cevap

Redesign the partition key using a high-cardinality attribute like a hashed combination of MatchID and CommentaryID, and deploy Amazon DynamoDB Accelerator (DAX) to serve reads.
Redesigning the partition key to a high-cardinality key like a hashed combination of MatchID and CommentaryID ensures that writes are distributed evenly across DynamoDB's physical partitions, preventing write throttling. Deploying DynamoDB Accelerator (DAX) fulfills the sub-millisecond read latency requirement by providing an in-memory cache.

Adım Adım Çözüm

1
Analyze the workload requirements and current bottlenecks.
The application requires high write throughput (15,00015,000 writes/sec) and sub-millisecond read latency. The current key (TournamentName_Timestamp) causes partition throttling due to sequential writes hitting the same partition.
Identifying the root cause of the performance bottleneck is necessary to choose the correct architectural fix.
2
Address the write bottleneck by redesigning the primary key structure.
By using a high-cardinality partition key (hashed combination of MatchID and CommentaryID), writes are distributed evenly across multiple physical DynamoDB partitions.
Distributing the partition key values prevents hot partitions and allows DynamoDB to scale throughput horizontally.
3
Address the read latency requirement.
Deploying Amazon DynamoDB Accelerator (DAX) caches reads, reducing response times from single-digit milliseconds to microseconds.
DAX is a fully managed, highly available, in-memory cache for DynamoDB that delivers microsecond response times.

Anahtar Kavram

Avoiding hot partitions in DynamoDB by using high-cardinality partition keys, and using DAX for microsecond read latency.
Bu soruyu puanla