Soru

Zorluk: OrtaHigh-Performing Database Solutions

A mobile gaming application requires a database backend to store real-time player session state. The application must support millions of concurrent users with sub-millisecond read latency and single-digit millisecond write latency. The session keys are generated sequentially using epoch timestamps. Which combination of database design choices will meet these requirements while preventing performance bottlenecks? (Select TWO.)

  1. Use Amazon DynamoDB with a composite primary key consisting of a partition key based on a hashed player ID and a sort key based on the sequential epoch timestamp.Cevap
  2. Deploy an Amazon DynamoDB Accelerator (DAX) cluster to cache frequently accessed read requests for player sessions.Cevap
  3. C
    Design the Amazon DynamoDB table with the sequential epoch timestamp as the partition key to preserve time-based ordering.
  4. D
    Migrate the application state to Amazon RDS for MySQL and configure read replicas in another Availability Zone to serve as the automatic, write-capable failover destination during write throttling events.

Cevap

Use Amazon DynamoDB with a composite partition key using a hashed player ID and a sort key using the epoch timestamp, and deploy an Amazon DynamoDB Accelerator (DAX) cluster to cache read requests.
To achieve a high-performing database solution that handles millions of concurrent users with low latency, Amazon DynamoDB is the appropriate choice. Designing a composite primary key with a hashed player ID as the partition key distributes the database writes evenly across physical partitions, preventing write throttling and avoiding the hot partition issue caused by sequential keys. Deploying DynamoDB Accelerator (DAX) provides an in-memory cache that reduces read latency from single-digit milliseconds to microseconds, satisfying the sub-millisecond read latency requirement.

Adım Adım Çözüm

1
Analyze the workload requirements and identify performance constraints.
The application requires millions of concurrent operations with sub-millisecond read latency, single-digit millisecond write latency, and must prevent write throttling from sequential keys.
Sequential keys (epoch timestamps) are monotonically increasing and will cause hot partition bottlenecks in DynamoDB if used as partition keys.
2
Select a primary key structure that distributes writes across partitions.
A composite key with a hashed partition key (player ID) and a sequential sort key (epoch timestamp) is selected.
Hashing the partition key ensures write operations are distributed uniformly across multiple partitions, preventing hot partition throttling, while the sort key maintains the chronological ordering of the sessions.
3
Address the sub-millisecond read latency requirement.
Amazon DynamoDB Accelerator (DAX) is selected for read caching.
DynamoDB native latency is single-digit milliseconds. To achieve microsecond (sub-millisecond) read latency, an in-memory cache like DAX is required.

Anahtar Kavram

High-performing database architectures utilizing Amazon DynamoDB partition design and DynamoDB Accelerator (DAX) caching to handle high-throughput, low-latency workloads.
Bu soruyu puanla