I have created an azure function that uses CosmosDBTrigger to monitor changes.
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)
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://learn.microsoft.com/azure/cosmos-db/partition-data