Now available on Compose - MongoDB 3.2

If you've been looking forward to some of the features of the recently released MongoDB 3.2 and waiting to try them on the Compose platform, we have good news for you. We've just turned on the ability to upgrade to MongoDB 3.2 on our beta MongoDB+ SSL-enabled deployments.

This is the first rollout of MongoDB 3.2 on the Compose platform, and we encourage you to to try it out. We’re looking forward to more of our customers using MongoDB+ with its SSL and enhanced high availability features. With the MongoDB 3.2 release, it’s an excellent opportunity to check out those new Compose features alongside the new MongoDB features.

How to get MongoDB 3.2 on Compose MongoDB+

Nothing could be simpler. Just sign up and create one or, if you are already signed up, create a new MongoDB+ deployment. You'll get MongoDB 3.2 by default.

If you already have a MongoDB+ deployment and you want to go MongoDB 3.2, go to your Compose Console and select your deployment. Then go to Settings where it will show you your current version (which should be 3.0.6) and offer you the chance to select 3.2 and start an upgrade. During the upgrade your deployment will be inaccessible as this is an extensive update.

What will you see with your new MongoDB 3.2 deployment? Let's give you a quick overview:

What's new with MongoDB 3.2?

Partial Indexes – A new index option allows filters to fine-control which documents are indexed based on any number of fields.

Validation – A document validator can now be added to a collection and can be configured to reject changes which don't conform to the rules set in the validator. Most, but not all, query operators can be used to define those rules.

Enhanced Aggregation – A lot of performance work has gone into MongoDB 3.2 though mostly on aggregation on sharded configurations, but there is better use of indexes in aggregation. Other enhancements are more visible like:

Lookup – Aggregation pipelines can now pull data from other collections into the documents they are processing using $lookup to give them the ability to left outer join documents.

Sample – When aggregating, you may only need a random sampling of records and the new $sample operator will let you do just that, pulling a selected number of documents out.

Standard Deviations – The aggregation pipeline's $group stage has two new operators. One, $stdDevSamp can now calculate the standard deviation of a sample (see above), while the other, $stdDevPop, can do the same for an entire population. These new features also join $avg, $min, $max and $sum in being available in the pipeline's $project stage.

New arithmetic expressions – The calculating power of aggregation has been boosted too with the addition of $sqrt, $abs, $log, $log10, $ln, $pow, $exp, $trunc, $ceil and $floor.

New array operations – You can now do more with arrays in the aggregation pipeline. You can take a slice of them with $sliceor just extract a single element with $arrayElemAt. You can use $concatArrays to concatenate multiple arrays to make a bigger array or you can filter down an array using $filter.

Bitfield operators – If you are using bit values to store data in MongoDB then the new operators $bitsAllSet, $bitsAnySet, $bitsAllClear and $bitsAnyClear will be a boon to anyone who uses $bit.

There's many more enhancements at various levels of MongoDB that are detailed in the official release notes.

Migrating your data to MongoDB+

For our current MongoDB customers using our Elastic deployments, there's a number of ways to move your data between them and a MongoDB+ deployment. Our current recommendation is to use mongodump and mongorestore to move the complete dataset between the instances. You'll need the latest version of those tools with SSL enabled to complete the process. Contact support@compose.io for assistance in planning your migration.

What's not in this first rollout of MongoDB 3.2?

There's one feature of MongoDB 3.2 we aren't currently enabling and that's WiredTiger support. Although MongoDB Inc have made WiredTiger the default in 3.2, they continue to support the original MMAPv1 storage engine. We are continuing to investigate ways to deliver WiredTiger support while retaining Compose's efficiently economical model.