You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/concepts/router/distribution-concepts.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Load Ratio = Aggregate of capacity consumed by all jobs assigned to the worker /
29
29
### Example
30
30
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:
31
31
32
-
```json
32
+
```
33
33
Worker A:
34
34
TotalCapacity = 5
35
35
ConsumedScore = 3 (Currently handling 3 chats)
@@ -53,11 +53,12 @@ TotalCapacity = 3
53
53
ConsumedScore = 0 (Currently idle)
54
54
LoadRatio = 0 / 4 = 0
55
55
LastAvailable: 2 min ago
56
-
57
-
Workers would be matched in order: D, C, A, B
58
56
```
57
+
Workers would be matched in order: D, C, A, B
59
58
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).
61
62
62
63
## Best Worker Mode
63
64
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
115
116
```
116
117
117
118
Explanation:
119
+
118
120
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.
119
121
120
122
### 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
171
173
```
172
174
173
175
Explanation:
176
+
174
177
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.
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