A gaming company is designing a global multiplayer matchmaking and lobby service on Azure. The system will store active game lobby metadata and player session states. The service will be deployed in North Europe and West Europe to support players in both regions, with a workload of 70% reads and 30% writes. The solution must meet the following requirements:
- Guarantee zero data loss (RPO = 0) in the event of a regional outage.
- Ensure write requests are distributed uniformly to prevent performance bottlenecks.
- Minimize read latency for players in both regions.
Which two configurations should you include in the database design?
- Configure the Azure Cosmos DB account to use a single write region in North Europe, a read region in West Europe, and set the default consistency level to Strong.Answer
- BConfigure the Azure Cosmos DB account in a single region with Locally Redundant Storage (LRS) to minimize write latency, and configure daily backups to handle regional disasters.
- Select a composite partition key combining the LobbyId and PlayerId for the session container.Answer
- DSelect RegionName as the partition key for the session container to optimize queries filtering by geographic location.
Answer
To meet the requirements, the database design must configure the Azure Cosmos DB account to use a single write region in North Europe with a read region in West Europe and the default consistency level set to Strong, and select a composite partition key combining the LobbyId and PlayerId for the session container.
To achieve zero data loss (RPO = 0) during a regional outage, the account must be configured with a single write region and Strong consistency. Strong consistency ensures synchronous replication across regions before write operations are acknowledged. Selecting a composite partition key combining LobbyId and PlayerId ensures high cardinality, which distributes write operations evenly across physical partitions and avoids hot partition bottlenecks.
Step-by-Step Solution
Key Concept
Azure Cosmos DB multi-region replication, consistency levels, and partition key strategy.