Skip to content

Commit 1104aca

Browse files
committed
Some fixes
1 parent d29593d commit 1104aca

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Load Ratio = Aggregate of capacity consumed by all jobs assigned to the worker /
2929
### Example
3030
Assume that each `chat` job has been configured to consume one capacity for a worker. A new chat job is queued into Job Router and the following workers are available to take the job:
3131

32-
```json
32+
```
3333
Worker A:
3434
TotalCapacity = 5
3535
ConsumedScore = 3 (Currently handling 3 chats)
@@ -53,11 +53,12 @@ TotalCapacity = 3
5353
ConsumedScore = 0 (Currently idle)
5454
LoadRatio = 0 / 4 = 0
5555
LastAvailable: 2 min ago
56-
57-
Workers would be matched in order: D, C, A, B
5856
```
57+
Workers would be matched in order: D, C, A, B
5958

60-
Explanation: Worker D has the lowest load ratio (0), so Worker D will be offered the job first. Workers A and C are tied with the same load ratio (0.6). However, Worker C has been available for a longer time (7 minutes ago) than Worker A (5 minutes ago), so Worker C will be matched before Worker A. Finally, Worker B will be matched last since Worker B has the highest load ratio (0.75).
59+
Explanation:
60+
61+
Worker D has the lowest load ratio (0), so Worker D will be offered the job first. Workers A and C are tied with the same load ratio (0.6). However, Worker C has been available for a longer time (7 minutes ago) than Worker A (5 minutes ago), so Worker C will be matched before Worker A. Finally, Worker B will be matched last since Worker B has the highest load ratio (0.75).
6162

6263
## Best Worker Mode
6364
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][worker-scoring]
@@ -115,6 +116,7 @@ Worker C's match score = 1 (for matching english language label) / 2 (total numb
115116
```
116117

117118
Explanation:
119+
118120
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.
119121

120122
### Default Worker Selector Matching
@@ -171,6 +173,7 @@ Worker F's match score = 1 (for segment not equal to vip) / 2 (total number of l
171173
```
172174

173175
Explanation:
176+
174177
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.
175178

176179
#### Other Label Operators
@@ -243,4 +246,5 @@ Worker I's match score = (1 + 1 / (1 + e^-((10 - 10) / 10)) + 1 / (1 + e^-((10 -
243246
```
244247

245248
Explanation:
249+
246250
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)