Azure Cosmos DB is not built on SQL Server or another existing database. It runs its own purpose-built, distributed database engine developed by Microsoft (it began as Azure DocumentDB and was originally an internal project called "Project Florence"). Key facts about the underlying engine - Data model: internally, data is stored in an Atom-Record-Sequence (ARS) format, a general model that lets the same engine expose several APIs. - Storage and indexing: a write-optimised, latch-free database engine. Items are stored as JSON documents, and every property is automatically indexed by default using an inverted index, built on a latch-free B-tree variant (the Bw-tree). - Distribution: data is split into logical partitions by partition key and spread across physical partitions. Each physical partition is a replica set (multiple replicas with consensus-based replication), which provides high availability and automatic failover. - Global distribution: data can be replicated to any number of Azure regions with five consistency levels: strong, bounded staleness, session, consistent prefix and eventual. - Request Units (RUs) normalise the cost of operations. API layer on top of the engine - API for NoSQL (the native API, queried with a SQL-like language — which is why people sometimes say "SQL API", although it is not SQL Server). - API for MongoDB (RU-based), API for Apache Cassandra, API for Apache Gremlin (graph) and API for Table. These are wire-protocol-compatible interfaces over the Cosmos DB engine, so you can use existing drivers. Products under the Cosmos name with different engines - Azure Cosmos DB for PostgreSQL is distributed PostgreSQL using the Citus extension (Microsoft has since steered new projects toward other PostgreSQL offerings). - The vCore-based MongoDB offering is built on the open-source DocumentDB engine, which runs on PostgreSQL. So in an interview you could say: "Cosmos DB uses Microsoft's own distributed, schema-agnostic engine with automatic indexing and the ARS data model. We used the NoSQL API, so we were not using SQL Server underneath — only a SQL-like query language."
Ravindra Wadile · · 0 likes