Azure Cosmos DB API for MongoDB v4.2 Is Here – Three Reasons to Upgrade Now

Gahl Levy

Azure Cosmos DB API for MongoDB Supports 4.2

We are excited to announce the general availability of Azure Cosmos DB API for MongoDB version 4.2! New aggregation functionality and improved security features, all built on the most scalable database platform make this the best release yet. A full list of supported features can be found in our technical documentation.

The Azure Cosmos DB API for MongoDB version 4.2 can be enabled on any new or existing database account in seconds, with zero downtime and no breaking changes to existing features.

API versions 4.0, 3.6, and 3.2 will continue to be supported and we don’t plan to EOL any of our supported versions. Read our blog post to learn more about how it’s possible for us to support many versions with easy upgrades/downgrades.

Diagram showing programming languages including Java and Ruby connecting to the Azure Cosmos DB API for MongoDB through the MongoDB wire protocol
Azure Cosmos DB API for MongoDB

What’s New in Version 4.2

New Aggregation Functionality

Azure Cosmos DB API for MongoDB 4.2 supports tons of new aggregation pipeline stages, operations, and expressions such as $merge, $regexFind, trigonometry expressions, and more! As a developer, this will make your life easier by removing the need to develop this logic in your application code.

Client-side Field Level Encryption

Security is crucial to any business. Client-side Field Level encryption support in 4.2 further secures your database by enabling individual fields to be selectively encrypted and maintaining the privacy of the encrypted data from database users and hosting providers. This feature also makes it easy to fulfill compliance requirements such as user-based data deletion. You’ll be getting the ability to explicitly encrypt and automatically decrypt data without needing to run any additional processes alongside your database drivers.

Newest release on the most scalable database platform

With version 4.2, you’re getting the latest features on the most scalable database platform plus the unique benefits of the Azure Cosmos DB API for MongoDB. The API enables your database to scale instantly, manages database sharding for you, and offers a 99.999% availability SLA. Additionally, you can run advanced analytics over your data with no ETL by using Azure Synapse Link with your API for MongoDB account, enable free tier on your account, or deploy your database in serverless mode to take advantage of per-operation billing.

Upgrade Now

Upgrading to API version 4.2 can be done in the Azure Portal or through the Azure CLI directly from version 4.0, 3.6, or 3.2. Before upgrading, make sure your clients are running a MongoDB 4.2 compatible version. As always, it is important to start database upgrades with development/test workloads first before upgrading production workloads. The step-by-step upgrade instructions can be found in our documentation.

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • Marc Legault 0

    Good to see some progress on this as someone who’s day job revolves around using this API. I have to say though, there seem to be many important features that are currently missing in Cosmos, not even considering the many newer versions of MongoDB that currently aren’t supported, and I haven’t found any mention of whether there are plans to implement them or if we should assume they will never be available (or at least won’t be for the foreseeable future).

    In particular, I’m working on an aggregation query at the moment, and the incompatibility of the “let” param within $lookup stages in aggregation pipelines, combined with no $expr and no array literals when using $in feels extremely limiting. I’m sure there’s probably some “better” way of modelling the data that would simplify the query and make those features unnecessary, but I don’t feel like your database architecture should be dictated by the specific limitations of the particular platform you’re using to host your DB.

    I totally get that Cosmos does a lot behind the scenes in terms of scaling, sharding, replication, etc. and I’m sure there are good reasons for the missing features, but I guess the main thing I’m looking for is a bit of transparency in terms of what the plans are for these features (and for future features for newer versions of Mongo). A roadmap would be really nice to have!

    Thanks.

Feedback usabilla icon