Global distribution of Cosmos DB

Databases are becoming a vital part of businesses in order to achieve qualities such as high availability and low latency. These can be classed as the key factors in introducing a safe and reliably system to any business, of any size. But for this blog, we will be looking at the global distribution of Cosmos DB which may attract medium or large enterprises.

Modern cloud applications have users from across the world meaning there is the need to replicate data across the world to provide data at the low latency that users expect. This is due to the reason that users will need to operate with the data that is required for them to carry out a task or objective effectively and efficiently.

Cosmos DB has several qualities that make it a leading cloud database that is an excellent choice for many applications, these are: low latency, elastic scalability and concrete Service Level Agreements (SLAs) for data consistency and high availability. The database can be configured to be globally distributed and available anywhere within the Azure regions. This allows us to lower the latency, placing the data closer to the users who require it will be effective, however, not all the data will be required but only fragments of the data which could also help to reduce costs on storage. Also, when distributing the database, there are advantages such as if one of the regions were to go down, another region could pick up the requests and respond within reasonably timing, when distributing data globally, latency of writes is a consideration and data may be out of date between regions depending on various factors. Azure Cosmos DB offers 99.999% read and write availability for multi-region databases.

With Cosmos DB, regions can be added and removed at any time at the click of the button when using the Azure Portal. Due to the multi-homing capabilities, the database continues to be highly available, without the need for pausing or redeploying the applications when adding or removing regions. Multi-homing allows applications to switch seamlessly between Azure Regions meaning there is no need for downtime when a failover occurs.

Cosmos DB multi-homing capabilities switching between Azure Regions

This image above, shows the regions and how they work to achieve a goal.  As mentioned before, these regions can be added as needed and removed to lower latency and increase availability. Due to the simplicity of adding and removing regions within Cosmos DB, the advantages of this factor is being able to distribute data globally with a web application used across the world, this is mostly for applications with high volume of users accessing the data. Also, with IoT, devices are writing data from all over the world.

Global Topology

Cosmos DB can be deployed into multiple cloud platforms such as public, sovereign, Department of Defence (DoD) and government clouds. The Azure Cosmos DB is managed and deployed on massive stamps of machines, with locally dedicated storage. To an extent, distributed database can also be used as a safety measure, in case of unaccounted occurrences such as outages, natural disasters etc. When replicating the data, this means that the database is safe in another location. To be fault tolerant, the data and systems are to be distributed, to recover from any data loss or outages.

topology for a distributed database.

As seen above in the image, this is the topology for a distributed database. Cosmos Database contains multi cosmos containers. The cosmos containers consist of logical units of Scalability and the distribution is done at the account level. Data within Cosmos DB is automatically indexed upon ingestion.

Azure Cosmos DB containers

Application program interface

 There are several APIs which can be used to interact with the database, which can be selected according to the comfortability of the user. For example, there is SQL, Gremlin, Cassandra, Table and Etcd APIs. This is a wide range of APIs which can be used to interact with the database and perform the read operations.

Summary

Cosmos DB is a database that is built for the cloud first and has several key features such as global distribution, elastic scaling, multiple APIs etc. Cosmos is a widely available and scalable database which can be used mostly by large enterprises due to the global presence. The ability to turn regions on and off helps organisations when they are planning for expansions or working with clients who may be from another region, who possibly may require access to the data within the company. This allows for bigger opportunities due to the scalability aspect. Also, with the capability of having the use of multiple API selections, makes using the database increases the usability.

Leave a Reply

Your email address will not be published. Required fields are marked *