Cosmos DB Partition‑Key Design for Multi‑Tenant SaaS with Point Reads
Guidance on choosing a tenant‑aware partition key, provisioning autoscale throughput, and configuring multi‑region writes to meet sub‑10ms point reads while isolating tenant data.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Guidance on choosing a tenant‑aware partition key, provisioning autoscale throughput, and configuring multi‑region writes to meet sub‑10ms point reads while isolating tenant data.
Your Cosmos DB partition key is chosen once and paid for forever. Here's how logical partitions, the 20 GB cap, and cross-partition fan-out should drive the decision — and how to validate it with measured RU charges.
An architecture note on Cosmos DB transactional batch: when partition-scoped atomicity fits, the smallest design that uses it, idempotent retry handling, and the signals that should push you to an outbox pattern instead.
A diagnostic guide for Azure Cosmos DB hot partitions: recognize throttling on a single logical partition despite healthy account-level metrics, identify the skewed partition key pattern, run ordered verification queries, apply targeted key redesigns, and know when to escalate.
A single partition key like /tenantId breaks down when one tenant outgrows 20 GB. Hierarchical partition keys in Cosmos DB fix that — if your queries filter top-down. Here's how to choose and verify.