Azure Cosmos DB API for MongoDB v4.0 Is Here – Three Reasons to Upgrade Now
General availability of the Azure Cosmos DB API for MongoDB v4.0 was announced today at Microsoft Ignite. This exciting release includes many new features to help you model complex business logic while leaving the tedious error handling to us. Developers will find it simple to migrate applications currently using MongoDB 4.0, and multi-document transactions, to Azure Cosmos DB. These applications will gain instant elasticity, transparent auto-sharding, serverless, near real-time analytics with Azure Synapse Link, and more. Getting started is easy – a new or existing database account can be enabled in seconds, with zero downtime – and API versions 3.6 and 3.2 will continue to be supported.
Watch the Ignite session “More scale, more performance. Get the latest from Azure Cache for Redis and Azure Cosmos DB“, available on-demand, for details on the features and use cases of Azure Cosmos DB API for MongoDB v4.0.
New features available in v4.0
The new version introduces three exciting new features and compelling reasons to upgrade:
1. Multi-Document Transactions: Multi-document transactions within an unsharded collection support enables you to group together dependent operations and treat them as one operation, while respecting all ACID semantics.
2. New Aggregation Functions: Many more aggregation functions are supported, such as the $toBool and $toDate conversion expressions. These will make your life easier by removing the need to handle these tasks in your application code.
3. Better Ecosystem Support: 4.0-compatible tooling makes the MongoDB ecosystem further accessible to developers.
Upgrade to v4.0: step-by-step instructions
Upgrade to Azure Cosmos DB API for MongoDB v4.0 from version 3.6 or 3.2 directly in the Azure Portal or through Azure CLI.
Pro Tip: Before beginning an upgrade, make sure your clients are running a MongoDB 4.0 compatible version. It is also important to start by upgrading development/test workloads before production workloads.
New to Azure Cosmos DB?
- Try Azure Cosmos DB free in production or non-production environments
- Download the free best practices and optimization guide
- Visit MS Learn to build your Azure Cosmos DB skills