An online multiplayer gaming platform stores active player session state and shopping cart data in an Azure Cosmos DB for NoSQL container. The platform experiences a high volume of writes ( operations per second) from players globally. Each document in the container has the following structure:
{
"sessionId": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"playerId": "p9o8i7u6-y5t4-r3e2-w1q0-l9k8j7h6g5f4",
"region": "US-East",
"cartItems": [ { "itemId": "item-993", "quantity": 1 } ],
"lastUpdated": 1781568000
}
The application has the following operational requirements:
- Query transactions must update multiple session and cart documents for a single player within the same region atomically using transactional batches.
- Read queries must retrieve session history for a specific player in a given region with the lowest possible Request Unit () consumption.
- The partitioning strategy must distribute throughput and storage demand evenly to prevent hot partitions.
Which two actions should you take to design and implement this partitioning strategy? (Select two.)
- Create a synthetic partition key by concatenating the playerId and region properties (e.g., playerId_region), and set this as the partition key of the container.Answer
- Include the concatenated value of playerId and region in the filter clause of all read queries retrieving session history.Answer
- CSet region as the container's partition key to automatically group all regional player sessions.
- DSet playerId as the partition key and append a random number suffix from to to the partition key value for each write operation.
- EConfigure the client application to use session consistency to automatically route single-player queries without specifying the region.