Azure Cosmos DB Partition Sets

We discussed replica-sets in previous post. In today’s post, we are going to discuss Partition sets.  Partition sets are geographically distributed structures that are used to manage physical partitions using a set of keys. Unlike, replica sets, which are limited within a cluster, partition sets are scoped to scale the whole region which might span multiple clusters and data centres as shown in the diagram below:

Image Source: Microsoft

From the diagram above, partition sets can be thought of as “super replica sets” with more widespread geographical distribution. Partition sets contain multiple replica sets with the same set of keys.

Similar to replica sets, partition sets dynamically manage memberships. Partition set membership is affected by events related to partitions such as, adding or removing a partition, adding or removing a region to Cosmos DB, failures etc. The membership management is decentralized meaning each partition set manages the membership independent of other partition sets.

There is an option to configure Cosmos DB with either one or multiple write regions. Depending on the write region configuration, partition sets can either accept writes in exactly one or multiple regions.

To summarize, both replica sets and partition sets are imperative to partition management in Cosmos DB. The dynamic membership feature of replica sets and partition sets, provides high availability and scalability to Cosmos DB.

Reference: https://docs.microsoft.com/en-us/azure/cosmos-db/global-dist-under-the-hood

2 thoughts on “Azure Cosmos DB Partition Sets

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: