Soru

Zorluk: OrtaAzure Cosmos DB and NoSQL Solutions

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?

  1. 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.Cevap
  2. B
    Configure 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.
  3. Select a composite partition key combining the LobbyId and PlayerId for the session container.Cevap
  4. D
    Select RegionName as the partition key for the session container to optimize queries filtering by geographic location.

Cevap

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.

Adım Adım Çözüm

1
Identify the consistency level and replication requirements for RPO = 0.
Strong consistency is required to ensure writes are committed in both regions synchronously.
Strong consistency guarantees no data loss (RPO = 0) but is not compatible with multi-region writes, so a single write region must be selected.
2
Analyze partition key cardinality requirements to prevent hot partitions.
A composite partition key combining LobbyId and PlayerId provides high cardinality.
Using low-cardinality keys like RegionName would group all data into very few partitions, whereas a composite key distributes write throughput evenly.

Anahtar Kavram

Azure Cosmos DB multi-region replication, consistency levels, and partition key strategy.
Bu soruyu puanla