What is MongoDB?
MongoDB is a general-purpose database that keeps each record as a document: a set of fields and values that can contain nested sub-documents and arrays, much like a JSON object. Documents are grouped into collections and encoded in BSON, a binary format that adds types such as dates, 64-bit integers and decimals. Because documents in one collection do not have to share the same fields, applications can add attributes without running schema migrations, while teams that want stricter control can apply validation rules. Queries are written as JSON-style filters, and aggregation pipelines filter, group, join and reshape data on the server in a series of stages.
The database is designed to run across many machines. A production deployment is normally a replica set, in which a primary node accepts writes and secondary nodes hold copies, electing a new primary automatically if the current one fails. Sharding splits large collections across several replica sets by a shard key, so capacity grows by adding servers. Multi-document ACID transactions have been available since version 4.0 in 2018. Developers connect through official drivers for languages including Java, Python, JavaScript, C#, Go and Rust, the mongosh command-line shell or the Compass desktop client.
MongoDB Inc. distributes the server in three forms: the free Community Server under the Server Side Public License, Enterprise Advanced with LDAP and Kerberos authentication, auditing and encrypted storage under a commercial license, and MongoDB Atlas, its managed cloud service. Teams often pick it over relational systems such as MySQL or Oracle Database when their data does not fit neatly into tables. Recent releases have emphasized performance and AI workloads: version 8.2 in September 2025 brought full-text and vector search, previously exclusive to Atlas, to self-managed servers as a public preview, and MongoDB 8.3 followed in May 2026.
Key features of MongoDB
- 01
Document data model
Records are stored as BSON documents of up to 16 MB that can nest objects and arrays. Fields can differ between documents in a collection, and optional JSON Schema validation enforces required fields and types where consistency matters.
- 02
Aggregation pipeline
Multistage pipelines process data inside the database, with stages that filter, group, sort, reshape and join collections through $lookup. Results can be written to other collections with $merge or $out for reporting and materialized views.
- 03
Secondary indexes
Indexes can cover single fields, compound keys, array elements, text, geospatial coordinates and wildcard paths. TTL indexes delete documents automatically after a set period, which suits session data, logs and caches.
- 04
Replica sets and failover
Each replica set keeps synchronized copies of data on several servers. If the primary becomes unavailable, the remaining members elect a new one within seconds, and applications can tune read preferences and write concerns to balance speed and consistency.
- 05
Horizontal sharding
Sharded clusters distribute a collection across multiple replica sets using ranged, hashed or zone-based shard keys. A balancer moves data between shards as the cluster grows, and since version 5.0 a collection can be resharded while it stays online.
- 06
Multi-document transactions
ACID transactions can change many documents and collections atomically. They arrived for replica sets in MongoDB 4.0 and were extended to sharded clusters in 4.2, making the database practical for payments, orders and similar records.
- 07
Change streams
Applications can subscribe to a real-time feed of inserts, updates and deletes on a collection, a database or a whole deployment, a mechanism commonly used to trigger downstream processing, refresh caches or feed event pipelines.
- 08
Queryable Encryption
Sensitive fields are encrypted on the client before they reach the server, yet the database can still run equality and range queries against them. The server never sees the plaintext values or the encryption keys.
Who uses MongoDB?
- Retailers and publishers store product catalogs and content libraries whose attributes vary from item to item without redesigning tables for every new field.
- Web, mobile and game back ends keep user profiles, sessions and player state in MongoDB and add shards as their audiences grow.
- Banks, insurers and telecom operators build a single view of each customer by combining records from many older systems into one document.
- Industrial and Internet of Things applications record sensor readings in time series collections, which compress measurements and speed up queries over time ranges.
- Development teams build retrieval-augmented generation and semantic search features that keep application data and vector embeddings in the same database.
History of MongoDB
10gen started writing MongoDB in 2007 as the storage layer for a planned cloud application platform. After abandoning the platform, the company released the database as open source in February 2009 under the GNU Affero General Public License, with drivers under the Apache license. Version 1.6 in 2010 introduced replica sets and production-ready sharding, and the aggregation framework arrived in 2.2 in 2012. MongoDB 3.0 in 2015 added the WiredTiger storage engine, obtained by acquiring its developer, and it became the default engine later that year.
Growth brought scrutiny. Early in 2017, attackers wiped and ransomed thousands of MongoDB servers left open to the internet without authentication, and version 3.6 made servers accept only local connections by default. Version 4.0 added multi-document transactions in 2018, and that October the company moved new releases to the Server Side Public License, which requires anyone offering the software as a public service to publish the source code used to run that service. Debian, Fedora and Red Hat Enterprise Linux dropped MongoDB, and the Open Source Initiative does not consider the license open source.
In December 2025, MongoDB patched MongoBleed (CVE-2025-14847), a flaw in the server’s handling of compressed network messages that let unauthenticated attackers read fragments of memory. Atlas clusters were fixed within days, but security firms reported attacks on unpatched self-managed servers.
- 2009
10gen releases MongoDB as open-source software in February.
- 2010
MongoDB 1.6 adds replica sets and production-ready sharding.
- 2015
MongoDB 3.0 introduces the WiredTiger storage engine.
- 2018
MongoDB 4.0 adds multi-document ACID transactions, and new releases move to the SSPL.
- 2021
MongoDB 5.0 adds native time series collections and live resharding.
- 2024
MongoDB 8.0 is released in October with a focus on performance.
- 2025
MongoDB 8.2 brings search and vector search to self-managed servers in public preview.
- 2026
MongoDB 8.3 is released in May, and search becomes generally available in Enterprise Advanced.
MongoDB pricing
Pricing modelFreemium
Community Server is free under the SSPL; Enterprise Advanced is a paid subscription with support, security features and management tools, and Atlas bills cloud usage.
Prices change often. Check the official MongoDB website for current plans.
MongoDB alternatives
Profiled on SoftwareLore:
Also considerPostgreSQL, Couchbase Server, Apache Cassandra, Amazon DocumentDB and Azure Cosmos DB
MongoDB: frequently asked questions
Who makes MongoDB?
MongoDB is made by MongoDB Inc., a New York software company listed on the Nasdaq under the ticker MDB. It was founded in 2007 as 10gen by Dwight Merriman, Eliot Horowitz and Kevin P. Ryan, and CJ Desai has been its chief executive since November 2025. The database’s source code is published on GitHub.
What is MongoDB used for?
MongoDB is used as the main operational database behind web, mobile and enterprise applications. Common workloads include product catalogs, content management, user profiles, real-time analytics, Internet of Things data, payment and order records and, increasingly, AI features that combine application data with vector search. It suits data whose structure varies or changes often.
Is MongoDB free?
Yes, the Community Server edition of MongoDB is free to download and use, including in commercial applications, under the Server Side Public License, although companies that offer the database itself as a service face extra obligations. Organizations pay for Enterprise Advanced, which adds security features, management tools and support, or for MongoDB Atlas cloud clusters beyond its free tier.
When was MongoDB released?
MongoDB was first released as open-source software by 10gen, the company now called MongoDB Inc., in February 2009, after about two years of development. Major versions have followed roughly once a year, including 4.0 with multi-document transactions in 2018 and 8.0 in October 2024, and MongoDB 8.3 was released in May 2026.
Is MongoDB open source?
Not under the Open Source Initiative’s definition. MongoDB was licensed under the GNU AGPL until October 2018, when MongoDB Inc. moved new releases to its Server Side Public License. The source code remains public, but the license requires companies offering MongoDB as a service to release the code they use to run that service, so it is usually described as source-available.
Is MongoDB a relational database?
No. MongoDB is a non-relational, or NoSQL, document database. Instead of spreading data across tables linked by foreign keys, it typically keeps related information together in a single document. It still supports joins through the $lookup aggregation stage, secondary indexes, schema validation and multi-document ACID transactions, features long associated with relational databases.
Sources
- MongoDB, Wikipedia en.wikipedia.org
- MongoDB software lifecycle schedules mongodb.com
- MongoDB 8.3 release announcement mongodb.com
- MongoDB Server security update, December 2025 mongodb.com
- MongoBleed (CVE-2025-14847) exploited in the wild, Tenable tenable.com
Last reviewed . Spotted an error? Send a correction.