A telemetry ingestion system processes device readings stored in an Azure Cosmos DB container. You are deploying multiple instances of a .NET background service to process changes in parallel using the Change Feed Processor. All instances will share a single lease container. To ensure that the workload is distributed across all running instances of the background service rather than having them duplicate processing, which configuration strategy should you apply?
- Initialize the change feed processor on all instances with the same processor name, but assign a unique instance name to each host.Answer
- BInitialize the change feed processor on all instances with the same processor name and the same instance name.
- CInitialize the change feed processor on all instances with a unique processor name for each instance.
- DConfigure the lease container to use the monitored container's partition key path, and initialize all instances with the same processor name.
Answer
Initialize the change feed processor on all instances with the same processor name, but assign a unique instance name to each host.
To distribute the processing load across multiple instances, the change feed processor requires a shared logical identifier (the processor name) and a unique physical identifier (the instance name) for each host. The shared processor name groups the instances into a single deployment unit, allowing them to lease different partitions of the feed dynamically. The unique instance name prevents conflicts by ensuring that only one host owns a given partition lease at a time.
Step-by-Step Solution
Key Concept
Change Feed Processor Scale-out Configuration
Estimated Time:1m 30s