Azure Cosmos DB

Alberto De Natale
3 min readMay 10, 2020

--

Azure Cosmos DB is the Microsoft NoSQL document DB that is a primary choice for who need scalability at little/no upfront costs.

Multi API, low migration costs

Azure Cosmos DB aims to minimize the cost of migration.

For this reason, Cosmos DB supports more APIs namely SQL, Cassandra, Gremlin, MongoDB, Table API and Etcd (currently in preview).

For instance, if your existing database is MongoDB, moving it to Cosmos DB aims to be as transparent as possible for all the applications that query it.

The preferred API is SQL, that’s why is called the Core API.

There is also a tool from Microsoft that will do automatically for you most of the work connected with the migration.

Automated Horizontal Scaling

Automated Horizontal scaling is a core feature of Cosmos DB. For some reference read:

It all goes down to the concept of partitions. For each container, the admin is just required to provide a partition key and Cosmos DB will take care of adding partitions.

Globally Distributed Data

Replicating your data across the globe is as easy as a making a few clicks with Azure Cosmos DB.

Azure Cosmos DB provides 5 levels of consistency empowering users to tune their synchronization overhead while moving data as easily as ever close to where they are actually used.

No Schema

Do you have a catalogue of products each of which is different in some measure from the other?

Documents DBs fit perfectly in this scenario!

The idea is similar to pivot a table in the SQL world. Each row becomes a document. And each document has its own structure.

If you have a table called Product that would contain the data related to a car and you needed to add a truck, you could save yourself all the time of tracking the schema changes.

Free Tier

Azure Cosmos DB costs are measured with Request Units, RUs.

An RU is the amount of CPU, Disk, IO and memory required to read 1KB of data in 1s.

The free tier provides 400 RU/s and 5GB free.

Summary

Azure Cosmos DB is a great choice if you need a solution that will easily scale with little/no upfront cost.

--

--

Alberto De Natale
Alberto De Natale

Written by Alberto De Natale

Alberto De Natale is a passionate tech-enthusiast software developer.

No responses yet