Where do I set a partitionKey in CosmosDB deployed as a Gremlin instance?

185 views Asked by At

I have several Vertices and Edges to create and think I might have "hot" sections of data. (as in Azure Table Storage)

Are my scalability and other knowledge from Azure Tables applicable to Gremlin on Azure? If so, how?

Namely, I want to have "subdivided slices" of sub-tenants (or user partitions) on the database. (If possible I might want to reference between them, or query both at the same time)

1

There are 1 answers

0
AnuragSharma-MSFT On

Scalability and performance of any Azure Cosmos DB API is based on partitioning. Same concept is applicable for Azure Cosmos Gremlin API. While creating a graph you need to define the partition key and partitions will be created based on that.

On top of it, you can go through below article that mentions few more optimization that can help with scalability and performance. As per the article, "Queries that obtain data from a single partition provide the best possible performance."

https://learn.microsoft.com/en-us/azure/cosmos-db/graph-partitioning