LAUNCHMongoDB 8.3 is built for the sub-100ms retrieval & zero downtime AI demands. Read blog >
AI DATAStop fighting your data layer. Get the memory & retrieval agents need to scale. Read blog >

Comparing Microsoft Azure DocumentDB, Cosmos DB, And MongoDB

Get Started Free

Table of contents

Cosmos DB is a fully managed NoSQL database offered on Microsoft Azure. It offers multiple front-end APIs, including one compatible with the MongoDB wire protocol. It is important to note that this API does not run any MongoDB code.

This is a high-level comparison of MongoDB Atlas and the Cosmos DB API for MongoDB. We strongly encourage readers to conduct their own research on how each system can serve their specific use case.

Azure Cosmos DB’s “API for MongoDB” supports two deployment options: Resource Unit (RU)- based Cosmos DB and dedicated instance-based Azure DocumentDB). Each is aimed at different use cases and differs in features and capabilities. In this comparison, we will also explore the main differences between RU and Azure DocumentDB deployments.

The table below shows how the different options stack up.

 

MongoDB AtlasMicrosoft Cosmos DB Imitation API for MongoDB
Choice of cloud providersYes. AWS, Azure, and Google CloudNo
Integrated text search, geospatial processingYesYes, in Azure DocumentDB. Not available in RU deployments.
Supports all MongoDB features with full application compatibilityYes. Runs native MongoDBNo. Does not run MongoDB server-side code
Access to the latest MongoDB versionYes. Runs the latest release of MongoDB or any supported previous versionsNo. The Cosmos DB MongoDB API does not offer full support for the latest MongoDB version
Free tierYes. 512 MB of memory and 5 GB of storageYes. For the Azure DocumentDB free cluster tier, high availability is not available, along with other limitations.
JSON data type supportBSON (Binary JSON). Optimized JSON format with native long, double, float, decimal, date, and time data typesBSON. Some data types have restrictions, including the inability to modify them once set in the RU provisioning model
Maximum document size16 MB16 MB
JSON schema for data governance controlsYesNo. All schema controls must be written in the app tier
Blend data with joins and unions for analytics queries in the native query languageYesNo
Replica set configurationUp to 50 replicas by default; expandable upon request. All replicas are configured as data-bearing nodesAzure DocumentDB deployments offer 2 replicas per replica set in High Availability mode
Automatic sharding supportYes. Scales writes horizontally across multiple nodes. Able to store multiple TB of data on every shard. Enables users to refine the shard key as application requirements evolve.Yes, in RU deployments. Sharding in Azure DocumentDB deployments supports fewer shards per cluster compared to MongoDB Atlas.
Pause and resume clustersYesNo
Database supported in on-premises and hybrid deploymentsYes. MongoDB Enterprise AdvancedNo

 

Global Clusters

MongoDB AtlasMicrosoft Cosmos DB imitation API for MongoDB
Multi-cloud deploymentYes. Deploy across 125+ AWS, Azure, and Google Cloud regionsNo. Cosmos DB users are limited to Azure only
Active-active clusters supporting global writes (Low-latency writes from anywhere in the world)YesYes
Cross-region replication; distribute data around the world for multi-region fault tolerance and local readsYesYes

 

Monitoring and Disaster Recovery

MongoDB AtlasMicrosoft Cosmos DB Imitation API for MongoDB
Automatic scaling of compute and storage for all configurationsYesYes, RU autoscaled (50% upcharge), Storage scaling in Azure DocumentDB is manual. Compute scaling is manual for all tiers except M200, which can scale from M80 to M200.
Monitoring of database health with automated alertingYesPartial
Backup snapshots with on-demand Point in Time restoreYesYes

 

Security Controls

MongoDB AtlasMicrosoft Cosmos DB imitation API for MongoDB
Granular role-based access controlYesYes
Encryption of data in-flightYes. TLS/SSL as standardYes
Encryption of data at-restYesYes
Client-side field level encryption. Encryption of data in-use. Data not readable by service providerYes. Fully supported through automatic encryptionYes. Separate implementation with limitations
Queryable Encryption; data encrypted on the client side can be queried without decryptionYesNo
LDAP IntegrationYesYes
Database-level auditing; track DDL, DML, DCL operationsYesYes
Bring your own KMSYesNo. Azure key vault only

 

Support and Services

MongoDB AtlasMicrosoft Cosmos DB imitation API for MongoDB
Database support delivered directly by MongoDB engineersYes. Available with an optional support contractNo
Consulting services from engineers with direct access to internal MongoDB expertiseYes. MongoDB Consulting ServicesNo

Get started with Atlas today

Get started in seconds. Our free clusters come with 512 MB of storage so you can play around with sample data and get oriented with our platform.
Try FreeContact sales
GET STARTED WITH:
  • 125+ regions worldwide
  • Sample data sets
  • Always-on authentication
  • End-to-end encryption
  • Command line tools