Skip to content

Commit 89c6af4

Browse files
Merge pull request #115131 from ealsur/users/ealsur/cfpinstance
Cosmos DB - Change Feed Processor deployment unit
2 parents e248d6b + b83df9e commit 89c6af4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

articles/cosmos-db/change-feed-processor.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: tisande
66
ms.service: cosmos-db
77
ms.devlang: dotnet
88
ms.topic: conceptual
9-
ms.date: 05/06/2020
9+
ms.date: 05/13/2020
1010
ms.reviewer: sngun
1111
---
1212

@@ -68,15 +68,21 @@ To prevent your change feed processor from getting "stuck" continuously retrying
6868

6969
In addition, you can use the [change feed estimator](how-to-use-change-feed-estimator.md) to monitor the progress of your change feed processor instances as they read the change feed. In addition to monitoring if the change feed processor gets "stuck" continuously retrying the same batch of changes, you can also understand if your change feed processor is lagging behind due to available resources like CPU, memory, and network bandwidth.
7070

71+
## Deployment unit
72+
73+
A single change feed processor deployment unit consists of one or more instances with the same `processorName` and lease container configuration. You can have many deployment units where each one has a different business flow for the changes and each deployment unit consisting of one or more instances.
74+
75+
For example, you might have one deployment unit that triggers an external API anytime there is a change in your container. Another deployment unit might move data, in real-time, each time there is a change. When a change happens in your monitored container, all your deployment units will get notified.
76+
7177
## Dynamic scaling
7278

73-
As mentioned during the introduction, the change feed processor can distribute compute across multiple instances automatically. You can deploy multiple instances of your application using the change feed processor and take advantage of it, the only key requirements are:
79+
As mentioned before, within a deployment unit you can have one or more instances. To take advantage of the compute distribution within the deployment unit, the only key requirements are:
7480

7581
1. All instances should have the same lease container configuration.
76-
1. All instances should have the same workflow name.
82+
1. All instances should have the same `processorName`.
7783
1. Each instance needs to have a different instance name (`WithInstanceName`).
7884

79-
If these three conditions apply, then the change feed processor will, using an equal distribution algorithm, distribute all the leases in the lease container across all running instances and parallelize compute. One lease can only be owned by one instance at a given time, so the maximum number of instances equals to the number of leases.
85+
If these three conditions apply, then 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. One lease can only be owned by one instance at a given time, so the maximum number of instances equals to the number of leases.
8086

8187
The number of instances can grow and shrink, and the change feed processor will dynamically adjust the load by redistributing accordingly.
8288

0 commit comments

Comments
 (0)