APPLIES TO:
MongoDB
General FAQ
Does Azure Cosmos DB for MongoDB (RU) support my data residency requirements?
Yes, data residency is governed at the database account level, which is associated with one or more regions. Typically, you create a database account for each residency requirement. For example, if you have a requirement to store data in the US and EU, you would create two database accounts, one in the US and one in the EU.
Does Azure Cosmos DB for MongoDB (RU) support documents larger than 2 MB?
Yes, documents as large as 16 MB are fully supported.
Does Azure Cosmos DB for MongoDB (RU) support multi-field sort?
Yes, multi-field sort is supported. A compound index is required for the fields in the sort to ensure the operation is efficient and scalable.
Does Azure Cosmos DB for MongoDB (RU) scale linearly?
In many cases, Azure Cosmos DB's costs scale better than linear. For example, if you read a 1-KB document, this operation equates to one Request Unit (RU). But if you read a 10-KB document, this larger operation still equates to roughly one RU. The capacity calculator can help you estimate your throughput needs.
How can I encrypt Azure Cosmos DB for MongoDB (RU) data and manage access at the field level?
Azure Cosmos DB for MongoDB (RU) supports Field Level Encryption.
How do I pay for Azure Cosmos DB for MongoDB (RU) Request Units (RUs)?
Azure Cosmos DB for MongoDB (RU) offers three capacity modes: provisioned throughput, autoscale, and serverless. Autoscale instantaneously scales to meet your needs, and serverless only charges for the throughput you use.
Which features are supported in Azure Cosmos DB for MongoDB (RU)?
Azure Cosmos DB for MongoDB (RU) supports a rich set of MongoDB features backed by Azure Cosmos DB's limitless scale architecture. These features include: Aggregation pipelines, Change streams, Indexes, Geospatial queries, and more. For more information, see feature support matrix.
Does Azure Cosmos DB for MongoDB (RU) run on-premises?
Azure Cosmos DB for MongoDB (RU) is a cloud-native multitenant service and isn't available on-premises. Azure Cosmos DB offers an emulator for local development and testing.
How do I connect to my Azure Cosmos DB for MongoDB (RU) database?
The quickest way to connect to an Azure Cosmos DB for MongoDB (RU) database is to use the Quick Start feature within the resource's page in the Azure portal. The Quick Start includes code snippets preconfigured to connect to your database.
Azure Cosmos DB enforces strict security requirements and standards. Azure Cosmos DB accounts require authentication and secure communication via transport layer security (TLS). In any examples you build, use TLS version 1.2.
For more information, see Connect to your API for MongoDB RU database.
What do the error codes mean while using Azure Cosmos DB for MongoDB (RU)?
Along with the common MongoDB error codes, Azure Cosmos DB for MongoDB (RU) has its own specific error codes. For more information, see API for MongoDB (RU) troubleshooting guide.
Are non-Microsoft drivers for MongoDB supported for use with Azure Cosmos DB for MongoDB (RU)?
Yes, you can use non-Microsoft MongoDB Open Database Connectivity (ODBC) drivers with Azure Cosmos DB for MongoDB (RU).
Role-based access control
Is it possible to manage role definitions and role assignments from the Azure portal?
Azure portal support for role management isn't available. However, role-based access control can be enabled via the features tab in the Azure portal.
How do I change a user's password?
Update the user definition with the new password.
What Cosmos DB for MongoDB versions support role-based access control?
Versions 3.6 and higher support role-based access control.
What are some of the limitations of role-based access control?
- The number of users and roles you can create must equal less than 10,000.
- The commands listCollections, listDatabases, killCursors, and currentOp are excluded from role-based access control.
- Users and Roles across databases aren't supported.
- You can only set or reset a user's password through the Azure CLI or Azure PowerShell.
- Configuring Users and Roles is only supported through Azure CLI / PowerShell.
- Disabling primary/secondary key authentication isn't supported. We recommend rotating your keys to prevent access when you enable role-based access control.
- Role-based access control policies for Azure Cosmos DB for MongoDB aren't automatically reinstated after a restore operation. You need to reconfigure these policies after the restoration process completes.