Azure DocumentDB (with MongoDB compatibility) is a fully managed, MongoDB-compatible database on Azure that runs MongoDB applications without code changes. Compared with MongoDB Atlas, Azure DocumentDB costs at least 40% less for equivalent compute and includes backups, Premium SSD v2 storage, and advanced text search at no extra charge. Azure DocumentDB supports 99.03% of MongoDB operators, and free tools to migrate MongoDB Atlas clusters from any cloud with minimal downtime (including a VS Code migration extension to meet developers and agents where they are already).
Key differences
|
Azure DocumentDB |
MongoDB Atlas |
| Cost |
At least 40% less for equivalent compute; most customers save more than 50% in total |
Higher compute cost, plus separate charges for backups, data transfer, Atlas Search, and support |
| Backups |
Included for up to 35 days for production-grade SKUs (M30 and above) at no extra cost |
Billed separately based on size of backups |
| Free tier |
32 GB of storage, no expiry |
512 MB of storage |
| Storage per node |
Up to 32 TB per shard, scaled independently of compute |
Up to 4 TB, tied to the instance size |
| Dev/test without high availability |
Available for development and test SKUs (M10, M20, and M25), which lowers cost |
No, clusters are only available with replica sets for both Prod and Non-Prod cluster tiers |
| SLA scope |
99.995%, covering the database and the underlying Azure platform |
99.995%, covering the database service software only |
| Billing and support |
No added cost and fully included with your Azure support plan |
A separate and tiered support contract in addition to Compute, Storage, Networking, and Backup costs |
Cost
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| Compute |
✅ Lower |
Higher |
Azure DocumentDB costs at least 40% less than MongoDB Atlas for equivalent compute. |
| Backups included |
✅ Yes |
❌ No |
Azure DocumentDB includes backups for up to 35 days for production-grade SKUs (M30 and above) with point-in-time restore at no extra charge. MongoDB Atlas charges for backup storage and restores. |
| High-performance storage included |
✅ Yes |
❌ No |
Azure DocumentDB includes Premium SSD v2 storage at no extra charge. MongoDB Atlas charges more for higher IOPS and more bandwidth requirements. |
| Advanced text search included |
✅ Yes |
❌ No |
Advanced text search is built into Azure DocumentDB at no extra cost, with no extract, transform, and load (ETL) pipeline. MongoDB Atlas requires Atlas Search, billed separately. |
| Data transfer |
Azure DocumentDB doesn't charge networking charges for node-to-node traffic, replication traffic across replicas and regions within the hosted service, or for data ingress and egress from the virtual networks within which the database nodes are hosted by the Azure platform. Users only see standard Azure networking data transfer charges for data ingress and egress from their application's virtual network. |
Atlas charges for data transfer charges for ingress and egress from the database's hosted virtual network. This condition can lead to the same traffic being double charged, first by Azure's standard data transfer costs and second by MongoDB Atlas' data transfer charges. |
|
| Support included |
✅ Yes |
❌ No |
Your existing Azure support plan covers Azure DocumentDB product support. MongoDB Atlas support plans are sold separately by support tiers. |
| Dev/test clusters without high availability |
✅ Yes |
❌ No |
Azure DocumentDB lets you turn off high availability for development and test clusters. MongoDB Atlas clusters are always available in replica sets, where test environments also pay for replicas. |
| Independent compute and storage |
✅ Yes |
❌ No |
Azure DocumentDB scales storage separately from compute. This condition allows for high storage and low throughput workloads to only scale storage while minimizing their Compute costs. MongoDB Atlas ties storage to instance size, which can lead to buying more compute than you need. |
| Reserved capacity |
✅ Yes |
❌ No |
Azure DocumentDB reserved capacity saves up to 40% for a one-year commitment and up to 60% for a three-year commitment. |
| Savings plan for databases |
✅ Yes |
❌ No |
Azure DocumentDB is eligible for the Azure savings plan for databases. |
| Free tier storage |
✅ 32 GB |
512 MB |
The Azure DocumentDB free tier is a dedicated cluster, free for the lifetime of your Azure account. |
Compatibility and licensing
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| MongoDB drivers and tools |
✅ Yes |
✅ Yes |
Azure DocumentDB works with MongoDB drivers, MongoDB Compass, and the MongoDB shell (mongosh). |
| MongoDB operator coverage |
✅ 99.03% |
✅ Yes |
Azure DocumentDB supports 99.03% of MongoDB query, projection, update, and aggregation operators. See MongoDB compatibility. |
| MongoDB wire protocol versions |
✅ 5.0, 6.0, 7.0, 8.0 |
✅ 7.0, 8.0 |
Azure DocumentDB supports older wire protocol versions that MongoDB Atlas no longer offers, so you can migrate without upgrading your application first. |
| Open source |
✅ Yes |
❌ No |
DocumentDB, the engine that powers Azure DocumentDB, is open source under the MIT license and governed by the Linux Foundation. MongoDB has used the Server Side Public License (SSPL) since 2018. |
| Multi-document ACID transactions |
✅ Yes |
✅ Yes |
Across collections and shards. |
| Aggregation pipeline |
✅ Yes |
✅ Yes |
|
| BSON data types |
✅ Yes |
✅ Yes |
|
| 16-MB maximum document size |
✅ Yes |
✅ Yes |
|
| Nesting depth |
✅ Unlimited |
100 levels |
|
| Joins and unions for analytics |
✅ Yes |
✅ Yes |
|
| JSON schema validation |
✅ Yes |
✅ Yes |
|
Deployment and availability
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| Fully managed service |
✅ Azure |
✅ Azure, AWS, Google Cloud |
Azure DocumentDB is a managed service on Azure. You can migrate MongoDB Atlas clusters from any of these clouds. |
| Same database on-premises and on other clouds |
✅ Yes |
✅ Yes |
The open-source DocumentDB engine runs on-premises and on any cloud through the DocumentDB Kubernetes operator, with cross-cloud replication to and from Azure DocumentDB. MongoDB offers MongoDB Enterprise Advanced for self-managed deployments. |
| SLA covers the cloud platform |
✅ Yes |
❌ No |
The Azure DocumentDB SLA covers the full stack: database, infrastructure, networking, and the underlying Azure platform. The MongoDB Atlas SLA doesn't cover the underlying cloud platform and covers only the database engine. |
| Multi-region replicas |
✅ Yes |
✅ Yes |
|
| Storage per node |
✅ Up to 32 TB |
Up to 4 TB |
Storage on both service is first compressed from the raw storage sent over the wire to the database engine. |
| Sharding |
✅ Yes |
✅ Yes |
Azure manages sharding for Azure DocumentDB, and you can shard existing collections online with no downtime. Most workloads don't need a shard key until a database reaches multiple terabytes. |
| Continuous backup with point-in-time restore |
✅ Yes |
✅ Yes |
Included at no extra cost in Azure DocumentDB. |
| Live migration |
✅ Yes |
✅ Yes |
Azure DocumentDB migrates from MongoDB Atlas online, using change streams. See Migration options. |
AI and search
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| Vector search |
✅ Yes |
✅ Yes |
Azure DocumentDB includes vector search at no extra cost, and can combine it with text and geospatial filters in one query. Azure DocumentDB also supports Microsoft's home grown DiskANN algorithm for optimal vector search performance. |
| Integrated text search and geospatial queries |
✅ Yes |
✅ Yes |
|
| Advanced text search without a separate service |
✅ Yes |
❌ No |
MongoDB Atlas uses Atlas Search, billed separately. |
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| Azure integrations |
✅ Native |
Partial |
Azure DocumentDB integrates natively with Microsoft Entra ID, Azure Monitor, Azure Private Link, and other Azure services. MongoDB Atlas integrates with select Azure services. |
| Data visualization |
✅ Power BI |
✅ Atlas Charts |
|
| Performance recommendations |
✅ Yes |
✅ Yes |
Azure DocumentDB Index Advisor recommends indexes for common queries. See How to understand the explain output |
Security and compliance
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| Microsoft Entra ID |
✅ Native |
Manual configuration |
Azure DocumentDB integrates natively with Microsoft Entra ID for authentication and role-based access control. |
| Security and compliance posture managed by Microsoft |
✅ Yes |
❌ No |
For Azure DocumentDB, Microsoft is responsible for the service's security and compliance posture. For MongoDB Atlas, MongoDB is responsible. |
| Encryption in transit and at rest |
✅ Yes |
✅ Yes |
Azure DocumentDB supports customer-managed keys in Azure Key Vault. |
| Client-side field-level encryption |
✅ Yes |
✅ Yes |
|
| Private networking |
✅ Yes |
✅ Yes |
Azure DocumentDB supports Azure Private Link and private endpoints. |
| LDAP integration |
✅ Yes |
✅ Yes |
|
| Database-level auditing |
✅ Yes |
✅ Yes |
|
Support
|
Azure DocumentDB |
MongoDB Atlas |
Notes |
| 24x7 expert support |
✅ Yes |
✅ Yes |
Microsoft provides 24x7 support for Azure DocumentDB through your Azure support plan, so one support team covers your database and the rest of your Azure services at no extra support cost. MongoDB provides 24x7 support for MongoDB Atlas through separate, tiered support plans. |
Migrate from MongoDB Atlas
You can migrate MongoDB Atlas clusters on Azure, AWS, or Google Cloud to Azure DocumentDB with free tools:
- Run the compatibility assessment in the Azure DocumentDB migration extension for Visual Studio Code.
- Create an Azure DocumentDB cluster sized to your workload. You can start with a free tier cluster for testing.
- Run an online migration with the migration extension or Azure Database Migration Service. Your application keeps running while changes replicate.
- Validate your data, then cut over your application.
See Migration options for step-by-step guidance.
Related content