A company is developing a centralized logging service that stores application log messages in Azure Cosmos DB.
The workload has the following characteristics:
- Throughput Profile: High-volume write ingestion of up to writes per second, with occasional read queries by administrators.
- Transactional Boundaries: There are no transactional requirements across different log entries; each log document is written independently.
- Read/Write Trade-off: The partitioning strategy must be optimized to maximize write throughput and avoid bottlenecks, even if it requires read queries for a specific day to span multiple partitions.
The log documents contain a `logDate` property (formatted as `YYYY-MM-DD`) and a `serviceName` property. Using `logDate` directly as the partition key would direct all writes for the current day to a single partition, causing a hot partition.
You need to select a partitioning strategy that distributes the write throughput evenly.
Which strategy should you use?
- Create a synthetic partition key by appending a random integer suffix to the `logDate` value.Answer
- BUse the `serviceName` property as the partition key.
- CUse the unmodified `logDate` property as the partition key.
- DSet the partition key to the client's Cosmos DB session consistency token.