Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DocumentDB (with MongoDB compatibility) is a fully managed, MongoDB-compatible database on Azure. Your existing MongoDB drivers, tools, and application code connect without changes. Azure DocumentDB supports 99.03% of MongoDB operators and offers 40% lower pricing on average compared with MongoDB Atlas on AWS. Actual savings depend on configuration and usage, with potential additional savings from included backups and database-node networking. Free tools migrate your data from MongoDB Atlas, Amazon DocumentDB, or self-hosted MongoDB, online and with minimal downtime.
Who uses Azure DocumentDB (with MongoDB compatibility)?
Azure DocumentDB (with MongoDB compatibility) is a drop-in managed replacement for teams that run MongoDB today. Find your starting point:
| You run MongoDB on... | Why move to Azure DocumentDB | Start here |
|---|---|---|
| MongoDB Atlas (on Azure, AWS, or Google Cloud) | Lower cost on compute, with no added backup costs or networking data transfer fees. One Azure bill for just vCores and storage and no markup for product support. | Migrate from MongoDB Atlas |
| Amazon DocumentDB | Higher MongoDB compatibility (99.03% of operators) and predictable vCore pricing with no I/O charges. | Migrate from Amazon DocumentDB |
| Self-hosted MongoDB on Azure VMs | No patching, upgrades, replica set management, or backup scripts. A 99.995% availability SLA. | Migrate from MongoDB on a VM |
| Self-hosted MongoDB on-premises | A fully managed service, plus the same open-source engine on-premises if you need hybrid. | Migrate from on-premises MongoDB |
| Nothing yet: you're building a new app | A free tier with 32 GB of storage, built-in vector search for AI apps, and MongoDB's familiar API. | Create a free cluster |
Lower cost than MongoDB Atlas
Azure DocumentDB costs 40% less on average than MongoDB Atlas on AWS. Your total savings depend on your configuration and usage. Azure DocumentDB includes the following features without separate service charges:
- Backups are included at no extra cost for active paid clusters, with a 35-day point-in-time restore window for non-burstable tiers and seven days for burstable tiers (M10, M20, and M25). Free tier doesn't support backup or restore.
- No extra networking charges no added costs for egress traffic from Azure DocumentDB (with MongoDB compatibility) database nodes to the application. Standard ingress and egress charges apply for traffic in and out of the application's virtual network.
- High-performance storage is included Premium SSD v2 storage comes at no extra charge. You get maximum IOPS and bandwidth limits by default, with only storage costs.
- Text and vector search are included. You don't pay for a separate search tier or vector database.
- Support is covered by your existing Azure support plan. No markup for product support like competitive offerings.
Pricing is based on vCores and storage, which you scale independently. Reserved capacity saves up to 40% with a one-year commitment and up to 60% with three years. Azure DocumentDB (with MongoDB compatibility) is also eligible for the savings plan for databases.
For pricing details, see Azure DocumentDB pricing.
99.03% MongoDB compatibility
Azure DocumentDB (with MongoDB compatibility) implements the MongoDB wire protocol, so any MongoDB driver connects to it. MongoDB Compass, the MongoDB shell (mongosh), and frameworks such as Mongoose and Spring Data work as they do with MongoDB. Azure DocumentDB (with MongoDB compatibility) supports MongoDB versions 4.0 through 8.0.
Azure DocumentDB supports 99.03% of MongoDB's query, projection, update, and aggregation operators. To see exactly what's supported, and how the percentage is calculated, see MongoDB compatibility. Before you migrate, run the free compatibility assessment in the Azure DocumentDB migration extension. It scans your workload and reports any unsupported features.
Free, guided migration
Azure DocumentDB includes free tools for moving MongoDB workloads from MongoDB Atlas, Amazon DocumentDB, and self-hosted MongoDB on-premises or on virtual machines:
- Azure DocumentDB (with MongoDB compatibility) migration extension for Visual Studio Code: assess compatibility, then run online or offline migrations by database or collection. It costs nothing to use.
- Azure Database Migration Service: run portal-based migration jobs that keep going after you close the browser.
- Native MongoDB tools: use
mongodumpandmongorestorefor simple offline moves.
Online migrations copy your data, then keep it in sync through change streams. Your application keeps running until you cut over. See Migration options for the step-by-step process.
Start free
The Azure DocumentDB (with MongoDB compatibility) free tier gives you a dedicated cluster with 32 GB of storage, free for the life of your account. By comparison, MongoDB Atlas's free tier offers 512 MB. Free tier clusters provision in seconds, and you can upgrade to a paid tier in place, keeping your data and connection string. See Azure DocumentDB (with MongoDB compatibility) free tier.
Scales with your application
Azure DocumentDB (with MongoDB compatibility) stores flexible, schema-agnostic documents, so your data model can change as your application grows. A single node supports up to 32 TB of storage, so most workloads don't need a shard key until they reach multiple terabytes. When you do need to shard, you can shard existing collections online with no downtime. You can scale compute up or down and increase storage independently while your application keeps running. Storage can't be decreased on an existing cluster.
Built-in vector search for AI applications
Azure DocumentDB (with MongoDB compatibility) includes an integrated vector database at no extra cost. You store documents and their vector embeddings together and query them with MongoDB's APIs. You can combine vector search with text and geospatial filters in one query, with no separate search service and no extract, transform, and load (ETL) pipeline.
Enterprise-ready on Azure
Azure DocumentDB (with MongoDB compatibility) is a first-party Azure service:
- Availability: a 99.995% availability SLA that covers the full stack: the database, infrastructure, and networking.
- Security: Microsoft Entra ID authentication and role-based access control, Azure Private Link and private endpoints, and encryption at rest and in transit.
- Governance and operations: Azure Monitor, and the Azure CLI.
- One bill, one support team: usage appears on your Azure invoice, and your Azure support plan covers it.
Open source, with no SSPL
Azure DocumentDB (with MongoDB compatibility) is built on DocumentDB, an open-source, MongoDB-compatible document database. DocumentDB is governed by the Linux Foundation and released under the permissive MIT license. Azure DocumentDB (with MongoDB compatibility) doesn't run the MongoDB database server or its codebase, so MongoDB's Server Side Public License (SSPL) doesn't apply to DocumentDB or Azure DocumentDB (with MongoDB compatibility).
Multicloud and hybrid
Because the DocumentDB engine is open source, you can run the same MongoDB-compatible API on-premises or on any cloud with the DocumentDB Kubernetes operator. Azure DocumentDB (with MongoDB compatibility) is the fully managed service for the same engine on Azure. Applications use the same drivers and interface in every environment, and cross-cloud replication and failover require no application changes. See the multicloud replication demo on YouTube.
Naming and history
- Azure DocumentDB (with MongoDB compatibility) was previously named vCore-based Azure Cosmos DB for MongoDB. Existing clusters, connection strings, and APIs didn't change with the new name.
- Azure DocumentDB (with MongoDB compatibility) isn't Amazon DocumentDB. Amazon DocumentDB is a separate AWS service. Azure DocumentDB (with MongoDB compatibility) is built on the open-source DocumentDB engine.
- Azure DocumentDB (with MongoDB compatibility) isn't the original Azure DocumentDB service from 2014â2017, which became Azure Cosmos DB.
- Azure DocumentDB (with MongoDB compatibility) and Azure Cosmos DB for MongoDB (RU) are different services.