Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Matias Quaranta for Cosmos DB Change Feed Processor distribution of traffic to multiple instances in the same deployment unit doesn't seem to work

That documentation says that:

the change feed processor will, using an equal distribution algorithm, distribute all the leases in the lease container across all running instances of that deployment unit and parallelize compute

How many leases are in your lease collection? Leases are documents that contain an "Owner" property and start with and id that matches your processorName.

The time it takes for running instances to detect a crash or sudden stop of another instance is governed by the acquireInterval (https://learn.microsoft.com/dotnet/api/microsoft.azure.cosmos.changefeedprocessorbuilder.withleaseconfiguration?view=azure-dotnet#microsoft-azure-cosmos-changefeedprocessorbuilder-withleaseconfiguration(system-nullable((system-timespan))-system-nullable((system-timespan))-system-nullable((system-timespan)))) which defaults to 17 seconds (how long it takes for any instance to scan for potential leases that have been dropped) and the expirationInterval which defaults to 60 seconds (how long does it take for a lease is considered expired/with no owner).

  1. As explained, the distribution is of the leases. If you have 1 lease, because the monitor collection has a single partition, then that is your current max. As the collection grows, more leases will dynamically appear.
  2. That already happens as you describe, the time it takes is governed by the configuration mentioned before.
  3. The leases owned by the instance will eventually be considered expired and another instance will grab them.

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>