MongoDB
activeby MongoDB, Inc. · since 2009 · also known as Mongo, MongoDB Community Server, MongoDB Enterprise Advanced
The default document database: flexible BSON documents, rich queries and built-in sharding.
Overview
MongoDB stores data as BSON documents in collections and queries them with the MongoDB Query API and aggregation pipeline, so application objects map onto storage without an ORM. Replica sets give automatic failover, native sharding spreads data across many nodes, and multi-document ACID transactions have been available since 4.0. Version 9.0 (GA September 2026) continues the push into search, vector search and performance. It is the reference implementation that a whole ecosystem of 'MongoDB-compatible' services measures itself against, but the server is under the source-available SSPL rather than an OSI license.
Strengths & trade-offs
Strengths
- +Document model maps directly to application objects; nested arrays and subdocuments avoid many joins
- +Native sharding plus replica sets with automatic failover, built into the core server
- +Aggregation pipeline is expressive enough for most reporting without a separate ETL step
- +Change streams give a resumable, ordered feed of writes for event-driven systems
- +Largest driver, tooling and hiring ecosystem of any document database
- +Queryable Encryption and field-level encryption for sensitive fields
Trade-offs
- −SSPL is not OSI open source, which blocks some redistributors and cloud vendors
- −Poor shard-key choices are painful to fix and can create hot shards
- −Multi-document transactions work but carry real latency and contention costs at scale
- −Embedding-versus-referencing decisions push data-modelling work onto the application team
- −Several advanced features (in-memory engine, auditing, encryption at rest) are Enterprise-only
Great for
- +Product catalogs with highly variable attributes
- +Content management and user-generated content
- +Mobile and web backends that evolve their schema weekly
- +IoT and event data with time-series collections
- +Operational data stores aggregating many upstream systems
- +RAG and semantic search next to operational data
Think twice for
- −Heavily relational models with many-to-many joins
- −Large analytical scans (use a columnar warehouse)
- −Teams that need a permissive OSI license for redistribution
Capabilities
Native or official first-party support · 16 of 25 tracked
Scale & consistency
- Comfortable data size
- Large · ≤ 1 PB
- Horizontal scaling
- Native
- Multi-region
- Read replicas
- Transactions
- Full ACID
- Consistency
- Tunable, Causal
- Schema
- Flexible
- Architecture
- Primary replica, Distributed, Client server
- Query languages
- MongoDB Query API (MQL), Aggregation pipeline
Range/hashed sharding scales writes; each shard has one primary. Zone sharding can pin data (and its writes) to a region, but a given document is written in one place.
Deployment
available on · AWS · Google Cloud · Azure
Ecosystem
Alternatives to MongoDB
MongoDB's own multi-cloud DBaaS, bundling search, vector search and stream processing.
mongodb vs mongodb-atlas →Memory-first distributed JSON database with SQL++, search, vector indexes and mobile sync.
mongodb vs couchbase →AWS's managed MongoDB-API database on a proprietary, Aurora-style storage layer.
mongodb vs amazon-documentdb →Microsoft's globally distributed, multi-API NoSQL and vector database with SLA-backed latency.
mongodb vs azure-cosmos-db →MIT-licensed, MongoDB-compatible document engine built as PostgreSQL extensions, run by the Linux Foundation.
mongodb vs documentdb-postgres →Drop-in MongoDB Community build with enterprise features like encryption, LDAP and hot backup.
mongodb vs percona-server-mongodb →MongoDB FAQ
What is MongoDB?
MongoDB is a document database by MongoDB, Inc., first released in 2009. MongoDB stores data as BSON documents in collections and queries them with the MongoDB Query API and aggregation pipeline, so application objects map onto storage without an ORM. Replica sets give automatic failover, native sharding spreads data across many nodes, and multi-document ACID transactions have been available since 4.0. Version 9.0 (GA September 2026) continues the push into search, vector search and performance. It is the reference implementation that a whole ecosystem of 'MongoDB-compatible' services measures itself against, but the server is under the source-available SSPL rather than an OSI license.
Is MongoDB open source?
Not in the OSI sense. MongoDB is source-available: you can read the code, but the license restricts some uses, typically offering it as a competing managed service. License: Server Side Public License v1 (Community); commercial (Enterprise).
Does MongoDB support ACID transactions?
Yes. MongoDB supports full ACID transactions, with tunable, causal consistency.
Does MongoDB scale horizontally?
MongoDB scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB). It supports cross-region read replicas.
How can I run MongoDB?
You can self-host it and use the vendor's managed cloud. Managed offerings include MongoDB Atlas. It is available on AWS, Google Cloud and Azure.
What is MongoDB best for?
MongoDB is a strong fit for product catalogs with highly variable attributes; content management and user-generated content; and mobile and web backends that evolve their schema weekly. Think twice for heavily relational models with many-to-many joins.
What are the best alternatives to MongoDB?
Common alternatives to MongoDB include MongoDB Atlas; Couchbase Server; Amazon DocumentDB; Azure Cosmos DB; and DocumentDB (open-source, PostgreSQL-based). The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is MongoDB?
MongoDB ranks #4 of 844 databases on the WhichDB Score (80.5/100), and #1 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.

