An organization is deploying a globally distributed multiplayer game. You are designing the Azure Cosmos DB NoSQL API account to store player profile data. The database must replicate data between East US and West US to support a read/write ratio of reads and writes. The architecture requires a availability SLA for both read and write operations. The player profile documents contain a unique `playerId`, a `countryCode` (with possible values), and a `lastLoginTimestamp`.
Which two options should you include in the design to meet the SLA and performance requirements? (Select TWO.)
- Enable write operations in multiple regions for the database account.Answer
- Configure playerId as the partition key for the player profile container.Answer
- CConfigure countryCode as the partition key for the player profile container.
- DDeploy the database in a single region with locally redundant storage (LRS).
Answer
Configure write operations in multiple regions and choose playerId as the partition key.
To achieve a write availability SLA in Azure Cosmos DB, the database account must be configured with write operations enabled in multiple regions. Additionally, to maintain high performance and prevent hot partitions under write load, the partition key must have high cardinality. Since playerId is unique for each player, it serves as an excellent partition key to distribute database operations evenly.
Step-by-Step Solution
Key Concept
Azure Cosmos DB high availability configuration and partition key design.