Category
database
5 articles across 3 sub-topics
CosmosDB Partition Internals: Logical vs Physical Partitions Explained
🔥 When Your Database Bill Triples Overnight A retail engineering team ships a flash-sale feature. Traffic spikes 10×. Their Azure CosmosDB bill triples within 24 hours. Queries that ran in 5ms now take 800ms. The on-call engineer bumps provisioned R...
Azure Cosmos DB Consistency Levels Explained: Strong, Bounded Staleness, Session, Consistent Prefix, and Eventual
TLDR: Cosmos DB offers five consistency levels — Strong, Bounded Staleness, Session, Consistent Prefix, Eventual — each with precise, non-obvious internal mechanics. Session does not mean HTTP session; it means a client-side token that tracks what yo...
Azure Cosmos DB API Modes Explained: NoSQL, MongoDB, Cassandra, PostgreSQL, Gremlin, and Table
TLDR: Cosmos DB's six API modes are wire-protocol compatibility layers over one shared ARS storage engine — except PostgreSQL (Citus), which is genuinely different. Every API emulates its native database incompletely, and those gaps are structural, n...

Types of Locks Explained: Optimistic vs. Pessimistic Locking
TLDR: Pessimistic locking locks the record before editing — safe but slower under low contention. Optimistic locking checks for changes before saving using a version number — fast but can fail and require retry under high contention. Choosing correct...
