A logistics company is designing an Azure Cosmos DB for NoSQL database to track inventory movements across 15 high-volume regional warehouses. The system has the following requirements:
* Each warehouse processes up to 100,000 inventory transaction logs per day.
* To maintain inventory accuracy, the system must use the Azure Cosmos DB SDK's TransactionalBatch to perform atomic, multi-document updates (such as deducting stock from one bin and adding it to another) within a warehouse context.
* While the write throughput is extremely high and distributed across the warehouses, business analysts run daily reporting queries to analyze the complete historical data of a single warehouse, which requires scanning months of logs.
* The design must prevent logical partitions from exceeding the 20 GB storage limit while maintaining transactional integrity.
Which two of the following strategies should you implement to satisfy these requirements?
- Create a synthetic partition key by concatenating the warehouse identifier and the current date (e.g., warehouseId_YYYY-MM-DD).Cevap
- Execute operations that must succeed or fail atomically using the SDK's TransactionalBatch class, targeting the same synthetic partition key value.Cevap
- CUse the warehouse identifier (warehouseId) alone as the partition key to ensure that all historical queries for a warehouse are single-partition reads.
- DAppend a random number suffix to the warehouse identifier (e.g., warehouseId_1 to warehouseId_10) to distribute writes more evenly across logical partitions.