A gaming company is developing a multiplayer online game and needs to design the database layer for its player profile and game state service. The service must handle a peak workload of write operations per second for state updates and read operations per second for profile queries. Read requests for the most active players must have a sub-millisecond (microsecond) latency, while write operations must complete in less than milliseconds. The traffic is highly dynamic and spikes during game events. Which database configuration should a solutions architect recommend to achieve the required performance?
- AConfigure Amazon DynamoDB with Amazon DynamoDB Accelerator (DAX) to cache read requests, and use a formatted Timestamp (YYYY-MM-DD-HH) as the partition key to ensure players are ordered by join date.
- BConfigure Amazon RDS for MySQL in a Multi-AZ deployment, configure the application to send write operations to the primary DB instance, and configure the application to use a Read Replica as the primary failover target for write operations if the primary DB instance fails.
- Configure Amazon DynamoDB with Amazon DynamoDB Accelerator (DAX) to cache read requests, and use a unique UUIDv4 PlayerID as the partition key to distribute write operations evenly across partitions.Answer
- DConfigure Amazon DynamoDB in Provisioned Capacity Mode, using a partition key of GameRegion (with distinct values) to group player profiles by geographic area.
Answer
Configure Amazon DynamoDB with Amazon DynamoDB Accelerator (DAX) to cache read requests, and use a unique UUIDv4 PlayerID as the partition key to distribute write operations evenly across partitions.
The configuration using Amazon DynamoDB with DynamoDB Accelerator (DAX) and a unique UUIDv4 PlayerID partition key is correct because DynamoDB naturally scales to meet high-throughput workloads, and DAX provides microsecond latency for hot read keys. A high-cardinality partition key like PlayerID (UUIDv4) distributes write traffic evenly across DynamoDB partitions, preventing performance bottlenecks and write throttling.
Step-by-Step Solution
Key Concept
To design high-performing database solutions, select partition keys with high cardinality (such as unique UUIDs) to distribute read and write traffic evenly across DynamoDB partitions, preventing hot spots. Use DynamoDB Accelerator (DAX) to provide microsecond read latency for frequently accessed items.
Estimated Time:2m 0s