简体   繁体   中英

Azure Cosmos Lease Container only creates one lease for whole container even though there are thousands of partitions

I have created an azure function that uses CosmosDBTrigger to monitor changes. Azure 函数设置

I added 120,000 items to the container very quickly and watched my azure function scale to 20 servers but there CPU was barely being utilized (except for one) 20台服务器,CPU不够用

I checked my lease container and there was only two items, one being the lease and one being the .info 在此处输入图片说明

Here is the settings for the lease container在此处输入图片说明

My partition in my container I am listening to is "ClientOrderId" so every order is in its own partition (write heavy). Why isn't my lease container distributing the leases so my azure functions can run in parallel?

Thanks in advance.

The number of leases is for the Physical Partitions, not Logical Partitions.

See: https://docs.microsoft.com/azure/cosmos-db/partition-data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM