What is the recommended partition key strategy for a Cosmos DB container storing IoT telemetry from thousands of devices?
- A Use the device timestamp as partition key
- B Use deviceId as partition key for high cardinality (correct answer)
- C Use a single partition 'telemetry' for all data
- D Use region name as partition key
Shortcut: deviceId provides high cardinality (many distinct values), distributing data evenly across partitions. Avoid low-cardinality keys like region or date alone, which create hot partitions.