> For the complete documentation index, see [llms.txt](https://docs.decisionrules.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/setup/microsoft-azure-setup/database-azure-cosmosdb/deprecated-azure-cosmos-db-ru.md).

# Deprecated: Azure Cosmos DB for MongoDB (RU)

RU-based Azure Cosmos DB for MongoDB is deprecated. Use Azure DocumentDB for new environments and move existing ones to it.

{% hint style="danger" %}
RU-based Azure Cosmos DB for MongoDB is **deprecated**. Do not use it for new environments. Use [Azure DocumentDB](https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/setup/microsoft-azure-setup/database-azure-cosmosdb.md) (formerly Cosmos DB vCore) instead, following Microsoft's own recommendation, and plan to move existing RU-based environments to it.
{% endhint %}

This page is kept for existing RU-based environments only.

## Limitations

* **Space Versioning is not supported.** Enabling it is refused with *"Space Versioning is not supported on Azure Cosmos DB for MongoDB (RU). Use MongoDB or Azure Cosmos DB for MongoDB (vCore)."* The `SPACE_VERSIONING_ALLOW_NON_TRANSACTIONAL_WRITES` variable does not change that. See [Self-Hosted Requirements](https://docs.decisionrules.io/doc/space/space-version-control/self-hosted-requirements.md).
* **Raw Data Table sorting.** Some sort orders cannot be served and are refused with *"This Raw Data Table sort is not supported by the current database provider. Reset sorting and try again."*
* **Wire compression.** Leave compression disabled. See [MongoDB Wire Compression](https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/mongodb-wire-compression.md).

## Moving to Azure DocumentDB

1. Create an Azure DocumentDB cluster as described in [Database - Azure DocumentDB](https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/setup/microsoft-azure-setup/database-azure-cosmosdb.md).
2. Copy your data to the new cluster. Copy the data only, not the indexes: DecisionRules creates its indexes when it starts.
3. Point `MONGO_DB_URI` and `BI_MONGO_DB_URI` to the new cluster and set `DB_TYPE=COSMOSDB_VCORE` on both the server and the Business Intelligence containers.

{% hint style="info" %}
Contact our support before you move a production environment.
{% endhint %}

## Setting up an RU-based account

Assign your resource group, give the account a name, choose a location and choose the **Serverless** capacity mode.

{% hint style="info" %}
Serverless Capacity mode has much lower operating costs compared to the Provisioned Throughput option. If for whatever reason you decide to go with the Provisioned Throughput option anyways, make sure to set the limit to a minimum of 12000 RUs.
{% endhint %}

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FHqyeaaq34IkytDoSgzCe%2Fimage.png?alt=media&amp;token=4d8e0f6c-18e0-4d2a-a5f7-4a3888d25e71" alt=""><figcaption><p>Basic settings</p></figcaption></figure>

Set your Global Distributions settings if needed. Next go to the Networking tab and fill in the settings.

{% hint style="warning" %}
It is recommended to use a Private Endpoint connection but for hassle free non-Prod environment deployments a Public Endpoint is also an option.
{% endhint %}

Create your private endpoint, making sure it shares the same virtual network as your future server container.

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FqsaBMMa4vv2bSqxGb8Bn%2Fimage.png?alt=media&amp;token=6f7d7983-1079-490b-84a5-e69352e02e40" alt=""><figcaption><p>Networking settings and Private Endpoint</p></figcaption></figure>

For the Backup Policy, Encryption and Tags choose whatever fits your use-case. Review the account and create.

#### Where to find a connection string

After the database account has been created, navigate to Settings / Connection strings. The connection string can be found under **Primary/Secondary connection string**.

{% hint style="danger" %}
If you use RU-based Cosmos DB you need to specify the **DB\_TYPE** environmental variable in your server and Business Intelligence containers with value **COSMOSDB**. More information here: [Environment Variables](https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/containers-environmental-variables.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decisionrules.io/doc/other-deployment-options/docker-and-on-premise/setup/microsoft-azure-setup/database-azure-cosmosdb/deprecated-azure-cosmos-db-ru.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
