What Is New in MongoDB 3.0
MongoDB 3.0 is a major release that introduces a pluggable storage engine API, the new WiredTiger storage engine, and significant enhancements to security and operations. This version marks a fundamental shift in architecture, allowing for greater flexibility and performance.
| Category | Key Changes |
|---|---|
| Storage Engines | Pluggable Storage Engine API, WiredTiger Engine, MMAPv1 Improvements |
| Security | SCRAM-SHA-1 Authentication, Enhanced TLS/SSL Options |
| Replication | Initial Sync Improvements, Catch-up Time After Elections |
| Sharding | Balancer During Failover, sh.status() Improvements |
| Tools & Operations | mongorestore Parallelism, mongodump for Specific Collections |
| Deprecations | MongoDB Monitoring Service (MMS), SSL 3.0 Support |
What are the new storage engine options?
The biggest change is the introduction of a pluggable storage engine API. This allows MongoDB to support multiple storage engines within the same deployment. The new WiredTiger engine is the star of the show, offering document-level concurrency control and native compression.
In practice, this means you can choose between the improved MMAPv1 engine for compatibility or WiredTiger for workloads that demand higher throughput and reduced storage footprint. The choice of engine directly impacts your concurrency model and disk usage.
How does WiredTiger improve performance?
WiredTiger uses document-level locking instead of the collection-level locking found in MMAPv1. This significantly increases concurrency, allowing multiple threads to modify different documents in the same collection simultaneously.
It also provides built-in compression for both data and indexes. You can configure snappy (default) or zlib for data, and prefix compression for indexes. This reduces storage costs, which matters because large datasets can consume less expensive SSD space.
What security enhancements were added?
Authentication got a major upgrade with SCRAM-SHA-1, which replaces the less secure MONGODB-CR mechanism. This provides a more robust challenge-response protocol for verifying user credentials.
TLS/SSL configuration was also improved with better certificate validation and the ability to disable specific protocols. Note that SSL 3.0 support is now deprecated due to the POODLE vulnerability, pushing users towards more modern TLS configurations.
Were there any operational improvements?
Initial sync for replica sets is now faster and more resilient. Secondaries can now fetch multiple collections in parallel and are better at handling network timeouts during the process, which reduces the window of vulnerability when adding new nodes.
The balancer in sharded clusters can now run during a failover event, improving availability. The sh.status() helper also received an upgrade, providing clearer output with more details about the state of your shards.
How did the tools change?
mongorestore gained a --numParallelCollections option, allowing it to restore multiple collections in parallel. This drastically speeds up the process of restoring large, multi-collection backups.
mongodump now supports the --viewsAsCollections flag. When used, it dumps the data behind a view as a regular collection, which is useful for migrating data from views to actual collections.
FAQ
Can I use both WiredTiger and MMAPv1 in the same replica set?
Yes, you can. The pluggable storage engine API allows different members of a replica set to use different storage engines. This is useful for a rolling upgrade or for having a member optimized for a specific type of workload.
Is it mandatory to switch to SCRAM-SHA-1 authentication?
For new deployments, yes. MONGODB-CR is deprecated. Existing deployments upgrading from 2.6 can continue to use MONGODB-CR, but you should plan to migrate users to SCRAM-SHA-1 for improved security.
What is the main benefit of document-level locking?
It dramatically increases write concurrency. With collection-level locking, a write operation to one document blocks writes to all other documents in that collection. WiredTiger's document-level locking allows simultaneous writes to different documents, which is a game-changer for high-throughput applications.
How does compression work in WiredTiger?
WiredTiger compresses data and indexes by default. For data, it uses the snappy compression algorithm (configurable to zlib). For indexes, it uses prefix compression. This happens transparently, reducing the data size on disk without requiring changes to your application code.
What happens to the MongoDB Monitoring Service (MMS)?
MMS is deprecated in 3.0. It was replaced by Cloud Manager, which offers the same functionality as a hosted service. You should plan to migrate your monitoring and backup plans to the new platform.