Azure Cosmos DB is a globally distributed NoSQL database with five consistency levels (Strong to Eventual). Request Units (RUs) are the currency — 1 RU ≈ 1 point read of a 1KB document. Choosing the right partition key is critical: high cardinality, even distribution, and alignment with query patterns. Cross-partition queries fan out to all partitions — expensive. Cosmos DB for NoSQL now supports integrated vector search with DiskANN indexing.
Five Cosmos DB consistency levels and their trade-offs.
A bad partition key cannot be changed without migrating all data. Evaluate: cardinality, write distribution, and query alignment BEFORE creating a container.
ReadItemAsync(id, partitionKey) = 1 RU. A cross-partition query with no index can cost 100s of RUs. Design your data so common reads are point reads.
Autoscale charges for actual usage between 10-100% of max RU. For a 1000 RU max with 100 RU actual, you pay for 100 RU. Manual provisioning would cost 1000 RU continuously.
Sign in to share your feedback and join the discussion.