You are designing the data storage architecture for a global multiplayer online game. The game requires a database to store player session state and real-time match telemetry.
The database tier must meet the following requirements:
- Support a write-heavy workload with an write-to-read ratio.
- Provide sub- write latency for session updates.
- Achieve a recovery point objective () guaranteeing zero data loss in the event of a regional datacenter outage.
- Store cold telemetry data older than days in Azure Blob Storage, ensuring the archived data also survives a regional datacenter outage.
- Secure client-side telemetry uploads to the archive storage using Shared Access Signatures (SAS) that can be immediately revoked if client credentials are compromised.
You have the following data fields for partitioning the database:
- `gameRegion` ( distinct values)
- `tenantId` ( distinct values)
- `playerId` (millions of unique values, uniformly distributed)
- `sessionType` ( distinct values)
Which architecture should you recommend?
- APartition the Cosmos DB container using gameRegion. Configure the Cosmos DB account to use Strong consistency with a secondary read region. Configure the archive storage account with Geo-redundant storage (GRS). Secure client-side uploads by generating Shared Access Signatures (SAS) associated with a Stored Access Policy.
- Partition the Cosmos DB container using playerId. Configure the Cosmos DB account to use Strong consistency with a secondary read region. Configure the archive storage account with Geo-redundant storage (GRS). Secure client-side uploads by generating Shared Access Signatures (SAS) associated with a Stored Access Policy.Answer
- CPartition the Cosmos DB container using playerId. Configure the Cosmos DB account to use Session consistency with a secondary read region. Configure the archive storage account with Locally redundant storage (LRS). Secure client-side uploads by generating Shared Access Signatures (SAS) associated with a Stored Access Policy.
- DPartition the Cosmos DB container using playerId. Configure the Cosmos DB account to use Strong consistency with a secondary read region. Configure the archive storage account with Geo-redundant storage (GRS). Secure client-side uploads by generating ad-hoc SAS tokens with a one-year lifetime directly signed by the storage account master key.