Provisioning a Cosmos DB Instance in Azure
The Step by Step how to provision and configure a Cosmos DB instance in the Azure portal
Log in to the Azure portal to create a Cosmos DB instance with SQL API and US Central US as the location. Cosmos should configure to Central US, and West US for replication and change the default consistency to Eventual.
The Diagram of Setup
Log in to portal.azure.com
In the Azure portal, navigate to the Azure Cosmos DB service.
Add a new Cosmos DB account with the following settings:
Create a Cosmos DB Instance
- API: Core (SQL)
- Apply Free Tier Discount: Do Not Apply
- Location: (US) Central US
- Geo-Redundancy: Enabled
- Multi-region Writes: Disabled
- Disable the Free Tier Option
Network Settings
Cosmos DB Backup Policy (Preview State)
Encryption – Default
Valdation Success – Click Create
Deployment Completed.
Configure your Cosmos DB Instance
In the Azure Cosmos DB dashboard, select Replicate data globally, and add the West US region.
Set the default consistency to Eventual.
Create a new .Net “Items” container.
After Create Container Click Open Data Explorer
Set the indexing policy of the new container to “lazy”.
Azure Cosmos DB also supports a Lazy indexing mode. Lazy indexing performs updates to the index at a much lower priority level when the engine is not doing any other work.
Configure an alert with the following parameters:
- Condition: Whenever the Provision Throughput is less than 50
- Alert rule name: Provisioned Throughput Alert
- Severity: 2