Skip to content

Commit 4cb3afa

Browse files
committed
acrolynx fixes
1 parent 7ad72a9 commit 4cb3afa

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

articles/communication-services/concepts/router/distribution-concepts.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ ms.service: azure-communication-services
1313

1414
# Distribution modes
1515

16-
When creating a distribution policy, the following distribution modes can be selected to define the strategy used to distribute jobs to workers:
16+
Distribution policies support the following distribution modes to define the strategy used to distribute jobs to workers:
1717

1818
## Round robin mode
1919

2020
Jobs are distributed in a circular fashion such that each available worker receives jobs in sequence.
2121

2222
## Longest idle mode
2323

24-
Jobs are distributed to the worker that is least utilized first. If there's a tie, the worker available for the longest time is picked. Utilization is calculated as a `Load Ratio` by the following algorithm:
24+
Jobs are distributed to the worker that's least utilized first. If there's a tie, the worker available for the longest time is picked. Utilization is calculated as a `Load Ratio` by the following algorithm:
2525

2626
Load Ratio = Aggregate of capacity consumed by all jobs assigned to the worker / Total capacity of the worker
2727

@@ -59,17 +59,17 @@ LastAvailable: 2 min ago
5959
Workers would be matched in order: D, C, A, B
6060
```
6161

62-
Worker D has the lowest load ratio (0), so Worker D is offered the job first. Workers A and C are tied with the same load ratio (0.6). However, Worker C is available for a longer time (7 minutes ago) than Worker A (5 minutes ago), so Worker C is matched before Worker A. Finally, Worker B is matched last since Worker B has the highest load ratio (0.75).
62+
Worker D has the lowest load ratio (0), so the job is first offered to Worker D. Workers A and C are tied with the same load ratio (0.6). However, Worker C is available for a longer time (7 minutes ago) than Worker A (5 minutes ago), so Worker C is matched before Worker A. Finally, Worker B is matched last since Worker B has the highest load ratio (0.75).
6363

6464
## Best worker mode
6565

6666
The workers that are best able to handle the job are picked first. The logic to rank Workers can be customized, with an expression or Azure function to compare two workers by specifying a Scoring Rule. [See example](../../how-tos/router-sdk/customize-worker-scoring.md)
6767

68-
When a Scoring Rule isn't provided, this distribution mode will use the default scoring method instead, which evaluates workers based on how the job's labels and selectors match with the worker's labels.
68+
When a Scoring Rule isn't provided, this distribution mode uses the default scoring method instead, which evaluates workers based on how the job's labels and selectors match with the worker's labels.
6969

7070
### Default label matching
7171

72-
For calculating a score based on the job's labels, the `Match Score` is incremented by 1 for every worker label that matches a corresponding label on the job and then divide by the total number of labels on the job. Therefore, the more labels that matched, the higher a worker's `Match Score`. The final `Match Score` will always be a value between 0 and 1.
72+
The `Match Score` is incremented by 1 for every worker label that matches a corresponding label on the job and then divide by the total number of labels on the job. Therefore, the more labels that matched, the higher a worker's `Match Score`. The final `Match Score` is always a value between 0 and 1.
7373

7474
#### Example
7575

@@ -124,15 +124,15 @@ Worker B's match score = 1 (for matching english language label) / 2 (total numb
124124
Worker C's match score = 1 (for matching english language label) / 2 (total number of labels) = 0.5
125125
```
126126

127-
Worker A would be matched first. Next, Worker B or Worker C would be matched, depending on who was available for a longer time, since the match score is tied.
127+
Worker A would be matched first. Next, Worker B or Worker C would be matched, depending on who was available for a longer time, since the match score is tied.
128128

129129
### Default worker selector matching
130130

131131
In the case where the job also contains worker selectors, the `Match Score` is calculated based on the `LabelOperator` of that worker selector.
132132

133133
#### Equal/notEqual label operators
134134

135-
The score is incremented by 1 if the worker selector has the `LabelOperator` `Equal` or `NotEqual` for each job label that matches that worker selector, similar to the `Label Matching` mechanism.
135+
If the `LabelOperator` worker selector is `Equal` or `NotEqual`, the score is incremented by 1 for each job label that matches that worker selector, similar to the `Label Matching` mechanism.
136136

137137
##### Example
138138

@@ -187,11 +187,11 @@ Worker E's match score = 1 (for matching department selector) + 1 (for matching
187187
Worker F's match score = 1 (for segment not equal to vip) / 2 (total number of labels) = 0.5
188188
```
189189

190-
Worker E would be matched first. Next, Worker D or Worker F would be matched, depending on who was available for a longer time, since the match score is tied.
190+
Worker E would be matched first. Next, Worker D or Worker F would be matched, depending on who was available for a longer time, since the match score is tied.
191191

192192
#### Other label operators
193193

194-
For worker selectors using operators that compare by magnitude (`GreaterThan`/`GreaterThanEqual`/`LessThan`/`LessThanEqual`), the worker's `Match Score` is incremented by an amount calculated using the logistic function (See Fig 1). The calculation is based on how much the worker's label value exceeds the worker selector's value or a lesser amount if it doesn't exceed the worker selector's value. Therefore, the more worker selector values the worker exceeds, and the greater the degree to which it does so, the higher a worker's score is.
194+
For worker selectors using operators that compare by magnitude (`GreaterThan`/`GreaterThanEqual`/`LessThan`/`LessThanEqual`), the worker's `Match Score` is incremented by an amount calculated using the logistic function (See Fig 1). The calculation is based on how much the worker's label value exceeds the worker selector's value or a lesser amount if it doesn't exceed the worker selector's value. Therefore, the more worker selector values the worker exceeds, and the greater the degree to which it does so, the higher a worker's score is.
195195

196196
:::image type="content" source="../media/router/distribution-concepts/logistic-function.png" alt-text="Diagram that shows logistic function.":::
197197

@@ -267,4 +267,4 @@ Worker H's match score = (1 + 1 / (1 + e^-((15 - 10) / 10)) + 1 / (1 + e^-((10 -
267267
Worker I's match score = (1 + 1 / (1 + e^-((10 - 10) / 10)) + 1 / (1 + e^-((10 - 9) / 10))) / 3 = 0.675
268268
```
269269

270-
All three workers match the worker selectors on the job and are eligible to work on it. However, we can see that Worker H exceeds the "sales" worker selector's value by a margin of 5. Meanwhile, Worker I only exceeds the cost worker selector's value by a margin of 1. Worker G doesn't exceed any of the worker selector's values at all. Therefore, Worker H would be matched first, followed by Worker I and finally Worker G would be matched last.
270+
All three workers match the worker selectors on the job and are eligible to work on it. However, we can see that Worker H exceeds the "sales" worker selector's value by a margin of 5. Meanwhile, Worker I only exceeds the cost worker selector's value by a margin of 1. Worker G doesn't exceed any of the worker selector's values at all. Therefore, Worker H would be matched first, followed by Worker I and finally Worker G would be matched last.

0 commit comments

Comments
 (0)