This version will reach end of life on Feb 2018. To upgrade, go to the Learn more about upgrading your version of MongoDB.

Release Notes for MongoDB 2.4

March 19, 2013

MongoDB 2.4 includes enhanced geospatial support, switch to V8 JavaScript engine, security enhancements, and text search (beta) and hashed index.

Minor Releases

2.4.14 – April 28, 2015

2.4.13 – February 25, 2015

2.4.12 – October 16, 2014

2.4.11 – August 18, 2014

2.4.10 – April 4, 2014

2.4.9 – January 10, 2014

2.4.8 – November 1, 2013

2.4.7 – October 21, 2013

2.4.6 – August 20, 2013

2.4.5 – July 3, 2013

2.4.4 – June 4, 2013

2.4.3 – April 23, 2013

2.4.2 – April 17, 2013

2.4.1 – April 17, 2013

Major New Features

The following changes in MongoDB affect both standard and Enterprise editions:

Geospatial Support Enhancements

Hashed Index

Add new hashed index to index documents using hashes of field values. When used to index a shard key, the hashed index ensures an evenly distributed shard key. See also Hashed Shard Keys.

Improvements to the Aggregation Framework

  • Improve support for geospatial queries. See the $geoWithin operator and the $geoNear pipeline stage.
  • Improve sort efficiency when the $sort stage immediately precedes a $limit in the pipeline.
  • Add new operators $millisecond and $concat and modify how $min operator processes null values.

Changes to Update Operators

Additional Limitations for Map-Reduce and $where Operations

The mapReduce command, group command, and the $where operator expressions cannot access certain global functions or properties, such as db, that are available in the mongo shell. See the individual command or operator for details.

Improvements to serverStatus Command

Provide additional metrics and customization for the serverStatus command. See db.serverStatus() and serverStatus for more information.

Security Enhancements

  • Introduce a role-based access control system User Privileges now use a new format for Privilege Documents.
  • Enforce uniqueness of the user in user privilege documents per database. Previous versions of MongoDB did not enforce this requirement, and existing databases may have duplicates.
  • Support encrypted connections using SSL certificates signed by a Certificate Authority. See Configure mongod and mongos for TLS/SSL.

For more information on security and risk management strategies, see MongoDB Security Practices and Procedures.

Performance Improvements

V8 JavaScript Engine

Change default JavaScript engine from SpiderMonkey to V8. The change provides improved concurrency for JavaScript operations, modernized JavaScript implementation, and the removal of non-standard SpiderMonkey features, and affects all JavaScript behavior including the commands mapReduce, group, and eval and the query operator $where.

See JavaScript Changes in MongoDB 2.4 for more information about all changes .

BSON Document Validation Enabled by Default for mongod and mongorestore

Enable basic BSON object validation for mongod and mongorestore when writing to MongoDB data files. See wireObjectCheck for details.

Index Build Enhancements

Set Parameters as Command Line Options

Provide --setParameter as a command line option for mongos and mongod. See mongod and mongos for list of available options for setParameter.

Changed Replication Behavior for Chunk Migration

By default, each document move during chunk migration in a sharded cluster propagates to at least one secondary before the balancer proceeds with its next operation. See Chunk Migration and Replication.

Improved Chunk Migration Queue Behavior

Increase performance for moving multiple chunks off an overloaded shard. The balancer no longer waits for the current migration’s delete phase to complete before starting the next chunk migration. See Chunk Migration Queuing for details.


The following changes are specific to MongoDB Enterprise Editions:

SASL Library Change

In 2.4.4, MongoDB Enterprise uses Cyrus SASL. Earlier 2.4 Enterprise versions use GNU SASL (libgsasl). To upgrade to 2.4.4 MongoDB Enterprise or greater, you must install all package dependencies related to this change, including the appropriate Cyrus SASL GSSAPI library. See Install MongoDB Enterprise for details of the dependencies.

New Modular Authentication System with Support for Kerberos

In 2.4, the MongoDB Enterprise now supports authentication via a Kerberos mechanism. See Configure MongoDB with Kerberos Authentication on Linux for more information. For drivers that provide support for Kerberos authentication to MongoDB, refer to Driver Support.

For more information on security and risk management strategies, see MongoDB Security Practices and Procedures.