Skip to content

Commit dce26d3

Browse files
authored
Merge pull request #191224 from Venkat1340/Users/Venkat1340/Changefeed
MSDocs: Change Feed Processor instance name
2 parents 13e32de + bf40311 commit dce26d3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: cosmos-db
77
ms.subservice: cosmosdb-sql
88
ms.devlang: csharp
99
ms.topic: conceptual
10-
ms.date: 11/16/2021
10+
ms.date: 03/10/2022
1111
ms.reviewer: sngun
1212
ms.custom: devx-track-csharp
1313
---
@@ -27,12 +27,12 @@ There are four main components of implementing the change feed processor:
2727

2828
1. **The lease container:** The lease container acts as a state storage and coordinates processing the change feed across multiple workers. The lease container can be stored in the same account as the monitored container or in a separate account.
2929

30-
1. **The host:** A host is an application instance that uses the change feed processor to listen for changes. Multiple instances with the same lease configuration can run in parallel, but each instance should have a different **instance name**.
30+
1. **The compute instance**: A compute instance hosts the change feed processor to listen for changes. Depending on the platform, it could be represented by a VM, a kubernetes pod, an Azure App Service instance, an actual physical machine. It has a unique identifier referenced as the *instance name* throughout this article.
3131

3232
1. **The delegate:** The delegate is the code that defines what you, the developer, want to do with each batch of changes that the change feed processor reads.
3333

3434
To further understand how these four elements of change feed processor work together, let's look at an example in the following diagram. The monitored container stores documents and uses 'City' as the partition key. We see that the partition key values are distributed in ranges that contain items.
35-
There are two host instances and the change feed processor is assigning different ranges of partition key values to each instance to maximize compute distribution.
35+
There are two compute instances and the change feed processor is assigning different ranges of partition key values to each instance to maximize compute distribution, each instance has a unique and different name.
3636
Each range is being read in parallel and its progress is maintained separately from other ranges in the lease container.
3737

3838
:::image type="content" source="./media/change-feed-processor/changefeedprocessor.png" alt-text="Change feed processor example" border="false":::
@@ -50,7 +50,7 @@ An example of a delegate would be:
5050

5151
[!code-csharp[Main](~/samples-cosmosdb-dotnet-change-feed-processor/src/Program.cs?name=Delegate)]
5252

53-
Finally you define a name for this processor instance with `WithInstanceName` and which is the container to maintain the lease state with `WithLeaseContainer`.
53+
Afterwards, you define the compute instance name or unique identifier with `WithInstanceName`, this should be unique and different in each compute instance you are deploying, and finally which is the container to maintain the lease state with `WithLeaseContainer`.
5454

5555
Calling `Build` will give you the processor instance that you can start by calling `StartAsync`.
5656

@@ -86,13 +86,13 @@ The change feed processor lets you hook to relevant events in its [life cycle](#
8686

8787
## Deployment unit
8888

89-
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.
89+
A single change feed processor deployment unit consists of one or more compute instances with the same `processorName` and lease container configuration but different instance name each. 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.
9090

9191
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.
9292

9393
## Dynamic scaling
9494

95-
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:
95+
As mentioned before, within a deployment unit you can have one or more compute instances. To take advantage of the compute distribution within the deployment unit, the only key requirements are:
9696

9797
1. All instances should have the same lease container configuration.
9898
1. All instances should have the same `processorName`.

0 commit comments

Comments
 (0)