In this article, we will learn how to replicate data to any Azure region globally.
Azure Cosmos DB allows distributing the data globally to any available Azure region with a click. With it, Azure Cosmos DB data is replicated in a transparent manner. Azure Cosmos DB also provides configurable options to replicate your data across multiple datacenters.
There are two ways to replicate the data,
- Manual Replication
- Automatic Replication
Each selected region is billed based on throughput (RUs) and data stored on SSDs for the cosmos db account. Throughput is billed as Request Units (RU) per second which is a currency for charging throughput for read, write, and query operations on an Azure Cosmos DB container.
Consistency Levels
Cosmos DB has different consistency level per account which applies automatically to all the databases and collections within the cosmos account.

These consistency levels are,
- Strong
Strong consistency provides the most predictable and intuitive programming model and ensures that your versions of documents in your replica do not lag behind the primary. When you configure your account with a strong consistency level, Cosmos DB provides a linearizability guarantee which means that reads are guaranteed to see the most recent write. If your application requires all replica documents to exactly match the primary at any point in time, this strategy makes a lot of sense. The downside is that the primary write operation will be a lot slower than usual because that operation has to wait for every replica to confirm that the operation has been committed. - Bounded Stateless
Bounded staleness consistency is most frequently chosen by globally distributed applications expecting low write latencies but total global order guarantees. Unlike strong consistency which is scoped to a single region, you can choose bound stateless consistency with any number of read regions (along with a write region). Bounded stateless is great for applications featuring group collaboration and sharing, stock ticker, publish-subscribe/queueing etc. - Session
Session consistency is the most widely used consistency level both for single region as well as, globally distributed applications. It provides write latencies, availability and read throughput comparable to that of eventual consistency but also provides the consistency guarantees that suit the needs of applications written to operate in the context of a user. - Consistent Prefix
Consistent prefix level guarantees that reads never see out of order writes. If writes were performed in the order `A, B, C`, then a client sees either `A`, `A,B`, or `A,B,C`, but never out of order like `A,C` or `B,A,C`. Consistent Prefix provides write latencies, availability and read throughput comparable to that of eventual consistency, but also provides the order guarantees that suit the needs of scenarios where the order is important. - Eventual
Eventual consistency is the weakest form of consistency which occurs because operations against the primary database commit immediately and do not wait for the replicas to confirm that they are committed. This is useful for scenarios where you need the highest tier of performance and the application does not require any ordering guarantees. Examples include the count of Retweets, Likes or non-threaded comments.






Dipa MehtaPosted Nov 24, 2019, 9:13 AM
Informative on Azure Cosmos DB .
Viknaraj ManogararajahPosted Jul 14, 2018, 11:06 PM
Nice Article, Thank you for sharing.........
Hadshana KamalanathanPosted Jul 14, 2018, 11:03 PM
Thank you for sharing...