Azure Cosmos DB’s API for MongoDB now supports server version 3.6

Sri Chintala

What is Azure Cosmos DB? Azure Cosmos DB is a globally distributed, multi-model database service that enables you to read and write data from any Azure region. It offers turnkey global distribution,guarantees single-digit millisecond latency at the 99th percentile, 99.999 percent high availability, with elastic scaling of throughput and storage.

Azure Cosmos DB’s API for MongoDB now supports server version 3.6

Azure Cosmos DB’s API for MongoDB now supports MongoDB wire protocol version 6 and server version 3.6.0. Starting October 15th, all new accounts provisioned using Azure Portal will have the option to provision with server version 3.6.0. All existing accounts will continue to be on v3.2 or v3.4 (based on their configuration) and will be fully supported.


What is new in v3.6 support? Server Version 3.6 includes support for new commands and aggregation pipeline stages added as part of the MongoDB v3.6 release, including but not limited to:

  • Compound indexes
  • ChangeFeed support via ChangeStream API
  • Creating unsharded collections under databases with throughput
  • Aggregation pipeline stages/operators

In addition to the above features, we have made significant performance improvements for most scenarios. In particular, Group, Count and Skip-Limit have much reduced latency compared to prior releases.

Compound indexes

You can now create compound indexes using the createIndex() command from Azure Cosmos DB’s API for MongoDB. Compound indexes give a huge performance boost for queries with:

  • Multiple properties in the Sort() definition
  • Find() and Sort() where the property in the Find() definition is part of Sort()
  • Find() with multiple properties filter where at least one property filter is equality.(e.g. db.test.find({a:1, b: {$gte: 5}, b: {$lte: 7}}); )

ChangeFeed via ChangeStream API

Azure Cosmos DB change feed provides a sorted list of documents within an Azure Cosmos DB collection in the order in which they were added or modified. This feed can be used to listen for modifications to data within the collection to perform real-time (stream) processing on updates. You can now consume Azure Cosmos DB change feed via the ChangeStream API functionality available in Mongo v3.6.

Unsharded collection under database with throughput

With the v3.6 release, we are relaxing the restriction requiring a shard key to be present in all collections created under a database with throughput. You can now create an unsharded collection under a shared throughput database both in “dedicated throughput” or “shared throughput” mode. Please note that the maximum size for unsharded collections is 10 GB.

Performance improvements in Aggregation pipeline/Count/Skip-limit

In additional to above features, we have made significant improvements in the Aggregation pipeline (most significantly in the $group stage), Count (with and without a filter) and Skip-Limit. These improvements should result in lower latency for these calls along with reduced Request Charges.

Please refer to our documentation Azure Cosmos DB’s API for MongoDB (3.6 version): supported features and syntax for the full list of supported features and commands.

Upgrading existing accounts

Currently, the v3.6 feature set is only available to newly created accounts. Over the course of the next few months, we will be working on adding the ability to upgrade existing accounts to MongoDB Server Version 3.6.

Get started

To get started, create a new account using the Azure Portal, ARM template or Azure CLI (Update: we don’t yet have support for ARM or CLI but are working on it. Will update here) and connect to it using your favorite tools. We’d love to hear your feedback as well at

Stay up-to-date on the latest Azure #CosmosDB news and features by following us on Twitter @AzureCosmosDB. We are really excited to see what you will build with Azure Cosmos DB


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

  • Aris van Ommeren 0

    Hi Sri,

    What is the default verson of Mongo when we provide it via az cli (can’t see it) and how can we influence that?

    The command currently executed is : `az cosmosdb create -n $ACCOUNT_NAME -g $RESOURCE_GROUP_NAME –kind MongoDB`

    • Mark BrownMicrosoft employee 1


      Hi Aris. Sorry for the slow reply. New accounts are created as version 3.2. We are working on making version 3.6 the default for az cli in Q1 2020 with the option of also specifying which version as well.


      • Aris van Ommeren 0

        `az cosmosdb create -n $ACCOUNT_NAME -g $RESOURCE_GROUP_NAME –kind MongoDB –capabilities EnableMongo` seems to work..!

  • Lindorff, Nathan 0

    Hi Sri,

    Any information on when migration from existing 3.2 databases will be available?

    • Mark BrownMicrosoft employee 0

      Hi Nathan. You can create a support ticket and we will do this for you.


Feedback usabilla icon