Compatibility and feature support

APPLIES TO: MongoDB vCore

Azure Cosmos DB for MongoDB vCore implements the MongoDB wire protocol, supporting nearly all MongoDB workloads with no application changes, giving you better TCO, superior performance, and next-gen AI features in a native Azure service.

The following table lists commands not supported/restricted by the database. As a Platform as a service (PaaS), Azure Cosmos DB subsumes or restricts the functionality of these commands to ensure cluster stability, security and performance, rendering them unnecessary.

Aggregation pipeline stages and aggregators

CommandReason
$planCacheStatsNot applicable, as the query plan cache is automatically managed by the service.
$accumulatorThese commands require a JavaScript engine to be hosted on the database server, enabling users to run arbitrary commands. This can pose significant security risks, including the potential for injection attacks or execution of malicious code. Due to the associated security risks and low demand from customers, these commands are currently not supported.
$function
$where
$searchMetaIt's not prioritized at this time due to low demand.
$listSearchIndexes
$listSampledQueries
$shardedDataDistribution

Database commands

Command TypeReason
Query plan cache commandsObsolete, as the query plan cache is automatically managed by the service.
User/Role management commandsAs a native Azure service, user and role management are integrated in the Azure ecosystem across services, eliminating the need for these database commands from the community version.
Replication commandsObsolete, as a Platform as a service (PaaS) replication is fully managed by the service.
Sharding commands (except: getShardMap, balancerStart, balancerStatus, balancerStop)We manage sharding for you, so you can focus on more critical tasks. However, you still have control over adding new shards, rebalancing shards, and retrieving a shard map whenever you need it.
Session commands ($killAllSessionsByPattern, $killSessions) Most session commands are supported, but a couple of them have been excluded due to low demand and inherent security risks. These commands could allow unauthorized users to terminate active sessions, risking service disruptions. Furthermore, they could be exploited to target specific users or usage patterns, potentially impacting normal operations. Without proper security measures, these commands could also create vulnerabilities by enabling the termination of multiple sessions simultaneously, increasing the likelihood of denial of service (DoS) attacks.
Administration commandsAs a PaaS service, Azure Cosmos DB handles database administration, making these commands unnecessary.
Diagnostic commandsAzure Cosmos DB is seamlessly integrated with Azure Log Analytics, offering a unified experience across Azure services. This enables in-depth analysis of server logs, giving you valuable insights into the performance and health of your database. With Azure’s built-in tools, you gain a powerful and scalable diagnostic solution, eliminating the need for extra configurations or third-party tools.
Auditing commands
Monitoring commandsAzure Cosmos DB is fully integrated with Azure Monitor, making it easy to track server utilization metrics like CPU, memory, storage, IOPS etc. This seamless integration across Azure services ensures a scalable and unified monitoring solution, providing real-time insights into your system's performance without the need for external monitoring tools.

Features

FeatureReason
Time series collectionsNot prioritized yet due to weak demand—support will be added in the future.
Capped collections
Clustered collections

Next steps