mongodb

MongoDB 4.0 is Now Available on the ObjectRocket Platform

By June 27, 2019 August 19th, 2019 No Comments

We are excited to announce that MongoDB version 4.0 has passed our tests and is generally available on the ObjectRocket platform.

What’s New in MongoDB 4.0?

You can get the full list of what is available in the MongoDB 4.0 release notes. Since 4.0 is a new major version release it includes a lot of new features and changes. Here are some of the updates and changes we wanted to highlight:

Multi-document transactions

ACID transactions are finally here, but only available on ReplicaSet. If you are running a sharded cluster you will need to wait for 4.2 which is going GA soon.

WiredTiger

MongoDB 4.0 comes with WiredTiger storage engine version 3.1. This version of the WiredTiger engine includes various performance enhancements. One enhancement we’re particularly excited about is non-blocking secondaries.

Non-blocking secondaries

Prior 4.0 writes on secondaries are applied as batches. MongoDB had to block reads during batches to avoid “wrong” order, and periodically the readers have to wait for replication batches to be applied. In 4.0 Secondary reads takes advantage of snapshots isolation, which relaxes the replication lock and allows reads while writes are happening.

Increased security

MongoDB adds support for the SCRAM-SHA-256 authentication mechanism. SHA-256 produces a 256 bits hash (vs 160 on SHA1) and is less vulnerable to collision attacks. Additionally, MongoDB 4.0 disables TLS 1.0 and deprecates MONGODB-CR for improved security out of the box.

Deprecates MMAPv1

You can still use MMAPv1 in 4.0 version but since it’s going to be removed in MongoDB 4.2 it’s a good time to start planning for the transition to WiredTiger. Our support team can help you complete the transition to WiredTiger without service disruption. Open a ticket here and we will start working with you.

Bug fixes

As every new version, 4.0 fixes bugs that aren’t backported. Put simply, this means that some bugs affecting older versions are fixed in 4.0 but never backported for different reasons in previous versions, like 3.6 and 3.4.

General enhancements

New Aggregation operators:

The command listCollections takes an Intent Shared lock on the database. In previous versions, the command takes Shared lock on the database.

The geospatial query operators $near and $nearSphere now supports querying on sharded collections.

Add new parameter AsyncRequestsSenderUseBaton to enable performance optimization on Linux for scatter/gather operations on Mongos when using a single Task Executor connection pool.

Mongos can log slow statements and can rate limit logged slow statements.

Change Streams, can now monitor an entire database or entire deployment.

Learn more about ObjectRocket for MongoDB.

What happens next?

Set up a call with our support team and we’ll put an upgrade plan in place that fits your needs. We can help you get ahead of potential problems, avoid unplanned maintenance, and help you figure out development updates, driver settings, and/or set up maintenance windows.

Want to spin up a MongoDB 4.0 instance today? Head to the app and get started.