MongoDB 4.0 is now generally available for production deployments. This release offers the best way to work with data, to intelligently place it where you need it, and the freedom to run anywhere. It serves all your operational, transactional, and real-time analytics workloads. Download MongoDB today, or try MongoDB 4.0 in the cloud with Atlas in minutes.
We are also announcing the release of Ops Manager 4.0 and Compass 1.14.0, accessible via our download center. Compass 1.14.0 introduces the Aggregation Pipeline Builder extending the MongoDB Compass point and click visual query editor to enable developers and business analysts to construct sophisticated processing pipelines that transform, aggregate, and analyze MongoDB data, all from a simple GUI.
In addition, we’re pleased to announce the public beta of MongoDB Charts. MongoDB Charts is designed to natively handle MongoDB’s rich data structures, making it easy to visualize complex arrays and subdocuments without flattening the data or spending time and effort on ETL. As an integrated tool, it connects directly to MongoDB so that your visualizations are created on live data, ensuring that you always have the most up-to-date view.
For more information about MongoDB 4.0, please see the following resources:
Read the What's New In MongoDB 4.0 white paper
Get up to speed on MongoDB with the MongoDB 4.0 Online Course
Review the MongoDB 4.0 Release Notes
Try MongoDB 4.0 in Atlas in minutes
MongoDB 4.0 includes many exciting new features. Here are some of the highlights:
Multi-document ACID transactions
With snapshot isolation and all-or-nothing execution, transactions extend MongoDB ACID data integrity guarantees to multiple documents across one or many collections. These feel just like the transactions you are familiar with from relational databases, are easy to add to any application that needs them, and do not impact the performance of workloads that don’t require them. With multi-document transactions it’s easier than ever for all developers to address a complete range of use cases with MongoDB, while for many of them, simply knowing that they are available will provide critical peace of mind. In MongoDB 4.0 transactions work across replica sets, and MongoDB 4.2 will support transactions across sharded clusters.
Snapshot Read Concern
Taking advantage of the transactions infrastructure introduced in MongoDB 4.0, the new snapshot read concern ensures queries and aggregations executed within a read-only transaction will operate against a single, isolated snapshot on the primary replica. As a result, a consistent view of the data is returned to the client, irrespective of whether that data is being simultaneously modified by concurrent operations. Snapshot reads are especially useful for operations that return data in batches with the `getMore`command.
Non-Blocking Secondary Reads
To ensure that reads could not return data that was not in the same causal order as the primary replica, MongoDB previously blocked secondary reads while oplog entries were applied. MongoDB 4.0 avoids blocking by reading from a snapshot on the secondary, improving read latencies and increasing throughput from the replica set, while maintaining a consistent ordering of data. For replica sets with a high write load, not having to wait for readers between applying oplog batches allows for reduced replication lag and faster confirmation of majority writes.
Extensions to Change Streams
Change Streams can now be configured track changes across an entire database or whole cluster. Additionally, change streams now will return a cluster time associated with an event, which can be used by the application to provide an associated wall clock time for the event.
Data Type Conversions
A $convert expression has been added to the aggregation framework. This will not only allow new ETL workloads and simplify app development, but also allow the MongoDB BI Connector to push down large amounts of work to MongoDB Server, unlocking significantly improved performance for users of this connector.
Improved Migrations Throughput
Sharded migrations are now up to 40% faster, so users can more easily and quickly scale capacity elastically in response to changing application demand as nodes are added and removed from sharded clusters.
SCRAM-SHA-256
We’ve added support for SCRAM-SHA-256, allowing individual users to store SHA-2 based credentials when security policies disallow the use of SHA-1.
Native TLS
On macOS and Windows, MongoDB now uses the platform's native cryptography and TLS support, and no longer uses OpenSSL. Additionally, the system certificate stores can be used to manage certificates.
Improved Sharded Operation Management
Operators can now list and kill queries running in a sharded cluster directly on a mongos node. When a sharded query either encounters an operation-fatal error, or is explicitly killed by an operator, on either mongos or any shard, the query will be promptly terminated on all other shards in the cluster.
Slow Query Logging on mongos
Previously only available on mongod, we now log operations which exceed a particular latency threshold on mongos, enabling DBAs to more quickly identify problematic queries.
Hybrid Cursor Caching
Improvements in cursor caching unlock up to 2x performance gains on deployments running with a large number of collections, and enable operations like dropping a collection to execute without causing any performance degradation on other active collections.
Download the latest drivers to take advantage of these new features. See the Driver compatibility matrix for the full list of languages supporting MongoDB 4.0.
For community users, MongoDB 4.0 adds a free monitoring cloud service, available wherever they run their databases. You can opt in and out of the service at any time directly from the MongoDB shell. With monitoring enabled, metrics collected by the serverStatus command are visualized by the MongoDB cloud GUI, accessed from a simple URL. Replica set configuration, memory, network, and disk usage, the status of active connections and logical sessions, page faults, locks, ops counters, query latency, TLS certificate lifecycles, and more are accessible. You can quickly assess database health and optimize performance, all from the convenience of a powerful browser-based GUI.
Last but not least, we would like to acknowledge the following community members who have contributed to this release: Aidan SE Mahler, Alexander Paderin, Alon Horev, Andrei Belashou, Andrew Stiegmann, Antoine Hom, Artem, Benoit Bui, Calvin Sze, CenZheng, Chibuikem Amaechi, Clive Hill, Dandan Lin, Daniel Stewart, David Bartley, Dmitri Shubin, Emmanuel Cagadas, Fox Lady, Gianfranco Palumbo, Gianluca De Cicco, Jelle van der Waa, Jozef Dobos, Juan Paulo Gutierrez, Juergen Zimmermann, Jun He, Keita Akutsu, Kevin Cybura, Maia Fox, Manuel, Marek Skalický, Matthew Kruse, Max Allan, Michael Jansen, Naveen, Olav Morken, Oleg Rekutin, Paco, Paderin Aleksandr, Patrik Laszlo, Peter Ahlers, Praveen Arkeri, Sergei Turchanov, Sergio Maruki, Simone Maratea, Tim Niemueller, Tomislav Plavcic, Xavier Del Castillo, Yuriy, atish, lang qiu, ppqtyq, and simon hall -- as well as over three thousand 4.0 beta testers. Thank you!
Please continue sending us your feedback!
Thanks,
The MongoDB Team