Introduction
CosmosDB is Microsoft provided database service that can suit any kind of application like web, IOT or gaming, etc., which requires massive read, write, and processing of data. Due to its indefinite capacity of handling data CosmosDB has become one of the sought-after Azure services of all time. Internally, just like any other non-relational database engines (mongodb, Cassandra etc.,) maintains all the data in an optimized storage model like Key-value, Graph or Document stores.
Advantages
There are many advantages that CosmosDB provides to its applications, some of them are listed below.
- Multiple APIs - With multiple APIs you can access the data stored in other mediums like SQL Core API, Cassandra, MongoDB, Gremlin, and Azure Table Storage. It also provides an easy way to migrate the data into CosmosDB.
- Scalability - For all unprecedented spikes in the workload to modify the structure anytime by adding or removing Azure regions to your cosmosdb account.
- Availability - Regional failover for cosmosdb account databases is possible which helps Microsoft to provide up to 5 nine’s – 99.999% availability.
- Secure - It has row level authorization as well as keeps the data encrypted at rest in motion.
Creating Azure CosmosDB
To begin with creating cosmosdb through azure portal, follow the instructions as per point number 01 and 02 given in the screenshot. At 01 type cosmosdb to go to the database creation page and click on create button.

When you click on create you will be asked to choose the API which you would like to select. I have selected Core (SQL) for this demo.

In the next window provide with the name and the highlighted part ‘Capacity Mode’ relates to how you will be billed.

CosmosDB is available in two different capacity modes: Provisioned throughput and Serverless. You can perform the exact same database operations in both modes, but the way you get billed for these operations will be different.
On the tabs followed by the Basics, you will have many options related to enabling encryption, backup policy, redundancy and multi-region writes.

The Quick Start page is the first you will see once you have created the CosmosDB resource. You can add a container where the data will be stored, the container can handle 400 request units per second throughput. But for now, we will not create the container here, I will show where this can be done manually which will have the option to change the RU/s as per our need.










Join the conversation! Your thoughts help the community grow.