What Is New in MongoDB 2.5
MongoDB 2.5 delivers a significant update focused on performance, security, and operational visibility. The release introduces a new aggregation framework, enhanced text search, and critical security features like Kerberos authentication. These changes make it a more robust platform for handling complex data processing tasks.
| Category | Key Changes |
|---|---|
| New Features | Aggregation Framework, Text Search (Beta), Kerberos Authentication |
| Improvements | Working Set Reporting, Index Builds in Background, Geospatial Enhancements |
| Security | Kerberos Support, SSL Certificate Validation |
| Deprecated | Non-SSL Support for Authentication, Old Aggregation Methods |
How does the new aggregation framework work?
The new aggregation framework provides a native pipeline for data transformation and analysis directly within the database. It uses a sequence of document processing stages, like $match, $group, and $sort, to filter and reshape data. This is a game-changer because it moves complex processing logic out of the application layer and into the database, which is far more efficient. In practice, it replaces the need for cumbersome MapReduce jobs for many common analytics tasks.
What can the text search beta do?
The text search feature introduces integrated, experimental full-text search capabilities. It allows you to create text indexes on string content and run queries that search for words or phrases across multiple fields. This matters because it removes the immediate need for a separate search engine like Elasticsearch for basic use cases. The implementation includes support for stemming, relevance scoring, and multi-language support.
db.collection.ensureIndex( { content: "text" } )
db.collection.runCommand( "text", { search: "mongodb release" } )
Why is Kerberos authentication a big deal?
Kerberos support brings enterprise-grade security to MongoDB authentication. It integrates with existing Windows Active Directory or MIT Kerberos deployments, allowing for centralized user and credential management. This simplifies security administration for large organizations where managing individual user accounts in MongoDB would be a nightmare. It's a clear signal that MongoDB is maturing into a platform fit for enterprise infrastructure.
How do working set reports help admins?
The working set reporting feature in serverStatus provides visibility into how much data is actively held in memory. It outputs metrics that help you understand if your working set fits in RAM or if you're facing excessive page faults. This is critical for performance tuning because it directly tells you if you need to scale your RAM or shard your data. You can access it via the command line or by calling the db.serverStatus() method in the shell.
FAQ
Is the text search feature production-ready?
No, it is marked as beta in the 2.5 release. It's intended for evaluation and development purposes only. For production systems requiring robust full-text search, you should still rely on dedicated solutions like Solr or Elasticsearch.
Does the aggregation framework replace MapReduce?
For many analytical and transformation tasks, yes. The aggregation framework is simpler and often faster for pipelines that can be expressed through its stages. However, MapReduce is still available for highly complex, custom data processing jobs that the aggregation pipeline cannot handle.
Are there any breaking changes when upgrading to 2.5?
The main consideration is the deprecation of sending authentication credentials over non-SSL connections. You need to ensure your clients are configured to use SSL for authentication to avoid connection issues after an upgrade.
Can I build indexes without blocking my database?
Yes, 2.5 introduces the ability to build indexes in the background on secondaries within a replica set. This is a major operational improvement as it allows you to add indexes without incurring a full write lock on your secondary nodes, reducing the impact on replication lag.
How do I try the new Kerberos authentication?
You need to configure both your MongoDB servers and your clients to use Kerberos. This involves setting up a Kerberos deployment (like Active Directory), generating keytab files, and starting mongod with the --setParameter authenticationMechanisms=GSSAPI option.