Set up a database for ScalarDB/ScalarDL deployment on Azure
This guide explains how to set up a database for ScalarDB/ScalarDL deployment on Azure.
Azure Cosmos DB for NoSQL​
Authentication method​
When you use Cosmos DB for NoSQL, you must set COSMOS_DB_URI
and COSMOS_DB_KEY
in the ScalarDB/ScalarDL properties file as follows.
scalar.db.contact_points=<COSMOS_DB_URI>
scalar.db.password=<COSMOS_DB_KEY>
scalar.db.storage=cosmos
Please refer to the following document for more details on the properties for Cosmos DB for NoSQL.
Required configuration/steps​
Create an Azure Cosmos DB account​
You must create an Azure Cosmos DB account with the NoSQL (core) API. You must set the Capacity mode as Provisioned throughput when you create it. Please refer to the official document for more details.
Configure a default consistency configuration​
You must set the Default consistency level as Strong. Please refer to the official document for more details.
Optional configurations/steps​
Configure backup configurations (Recommended in the production environment)​
You can configure Backup modes as Continuous backup mode for PITR. Please refer to the official document for more details.
It is recommended since the continuous backup mode automatically and continuously gets backups so that we can reduce downtime (pause duration) for backup operations. Please refer to the following document for more details on how to backup/restore the Scalar product data.
Configure monitoring (Recommended in the production environment)​
You can configure the monitoring of Cosmos DB using its native feature. Please refer to the official document for more details.
It is recommended since the metrics and logs help you to investigate some issues in the production environment when they happen.