cloudparts

DocumentDB

A MongoDB-compatible document database built as PostgreSQL extensions plus a gateway, so MongoDB drivers and tools talk to Postgres underneath.

Linux Foundation project
Type
Open source
Made by
DocumentDB project (LF Projects, started at Microsoft)
Foundation
The Linux Foundation, joined August 2025. A series of LF Projects, LLC, donated by Microsoft
License
MIT
Facts checked
28 October 2026

What it is

DocumentDB is three pieces that sit on an ordinary PostgreSQL server. pg_documentdb_core adds a BSON data type and its operators to Postgres. pg_documentdb is the API layer: it stores each collection as a Postgres table of BSON documents and implements inserts, updates, queries, aggregation pipelines and index management as SQL functions. pg_documentdb_gw, a gateway written in Rust, speaks the MongoDB wire protocol and turns each command into calls on those functions. An application connects with a normal MongoDB driver (mongodb://…) and never sees SQL, while an operator gets Postgres’s storage, write-ahead log, backups and extensions. Full-text, geospatial and vector search are included; vector search comes from the pgvector extension.

Microsoft released it in January 2025 as the engine behind the vCore-based Azure Cosmos DB for MongoDB, a service renamed Azure DocumentDB in November 2025. It moved to the Linux Foundation in August 2025, and its technical steering committee now has members from Microsoft, Amazon, AB InBev, Rippling and Yugabyte. DocumentDB 1.0, the first generally available release, shipped on 19 October 2026 with packages for PostgreSQL 17 and 18, container images for PostgreSQL 15 to 18, a Kubernetes operator (also 1.0) and a VS Code extension. Despite the name, it is unrelated to Amazon DocumentDB, AWS’s proprietary MongoDB-compatible service.

Why teams pick it

  • Keeps MongoDB drivers, shells and query code, but runs on PostgreSQL, which many teams already know how to operate, back up and monitor
  • MIT licence with no usage or distribution restrictions, unlike MongoDB’s SSPL
  • Neutral governance: Microsoft, AWS and Yugabyte contribute, and Azure DocumentDB is built on the same code
  • One versioning scheme with a long-term-support track from 1.0, plus a Kubernetes operator for running it yourself

Watch out for

  • A reimplementation of the MongoDB API, not MongoDB: some commands and operators behave differently or are missing, so test the queries your application uses
  • High availability is Postgres replication, not MongoDB replica sets: on Kubernetes the operator builds clusters on CloudNativePG, otherwise you set up Postgres replication and failover yourself
  • Young as a standalone product: 1.0 arrived in October 2026, and the documentdb-local container sends usage telemetry unless you turn it off
  • The name collides with Amazon DocumentDB and with Azure’s Microsoft.DocumentDB resource namespace, which makes documentation searches confusing
Data model
BSON documents in collections, stored as rows of a PostgreSQL table
Query language
MongoDB query filters and aggregation pipelines
Client protocol
MongoDB wire protocol, through a Rust gateway
Secondary indexes
Indexes created with createIndex, including text, geospatial and vector (pgvector) search
Storage engine
PostgreSQL heap tables and WAL
Written in
C and SQL extensions, Rust gateway
Ways to run it
Linux packages, Docker image, Kubernetes operator, or Azure DocumentDB

Alternatives

What all document databases have in common →Compare side by side →

How it fits with other technologies

Run DocumentDB locally and talk to it with a MongoDB client · bash

docker run -dt -p 10260:10260 --name documentdb \
  -e USERNAME=app -e PASSWORD=secret \
  ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0

mongosh 'mongodb://app:secret@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true'

# inside mongosh: plain MongoDB API calls, stored as BSON rows in Postgres
# db.orders.insertOne({ customer: 'ada', items: [{ sku: 'A1', qty: 2 }], total: 18 })
# db.orders.createIndex({ customer: 1 })
# db.orders.aggregate([{ $match: { total: { $gt: 10 } } },
#                      { $group: { _id: '$customer', spent: { $sum: '$total' } } }])

See it in a real stack

No architecture uses DocumentDB yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from2025–2026

Microsoft built the engine in 2024 for the vCore-based Azure Cosmos DB for MongoDB, a service that, unlike the original Cosmos DB API for MongoDB, ran on PostgreSQL rather than on the Cosmos DB engine. On 23 January 2025 it published the two PostgreSQL extensions under the MIT licence as DocumentDB, arguing that document databases lacked an open, portable standard and that teams wanted a fully supported local instance. The gateway that speaks the MongoDB wire protocol followed in the same repository.

On 25 August 2025, at Open Source Summit Europe, the Linux Foundation announced that DocumentDB had joined it, with AWS, Google, Yugabyte, Supabase, Snowflake, Cockroach Labs and others named as supporters. The repository moved from Microsoft’s GitHub organisation to its own. Microsoft renamed its managed service Azure DocumentDB that November, and the project reached 1.0 on 19 October 2026, with a proposal for a yearly major release that is supported until three months after the next one.

Why it’s built this way

Build on PostgreSQL instead of a new storage engine
Postgres already had durable storage, replication, extensions and a large operations community; the project’s README lists its stability, extensibility and features as the reasons.
Implement the MongoDB API rather than invent one
Existing drivers, tools and application code work unchanged, which is what most people moving document workloads need.
MIT licence and a foundation
Microsoft wanted a standard others could build on; AWS, which runs its own MongoDB-compatible service, said it valued “a permissively licensed database for implementing the MongoDB API”.

Timeline

  1. 2025

    Open-sourced by Microsoft (January); joins the Linux Foundation (August); Azure Cosmos DB for MongoDB vCore renamed Azure DocumentDB (November)

  2. 2026

    DocumentDB 1.0, its Kubernetes operator 1.0 and VS Code extension 1.0 (October)

Sources10 · facts checked 28 October 2026

Improve this page on GitHub