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
Introduce the Labels mechanism. Give Labels to Actors/Tasks/Nodes/Objects.
5
-
Affinity features such as ActorAffinity/NodeAffinity can be realized through Labels.
4
+
Introduce labels mechanism, which associate an enumerated property to Ray nodes. We can static assign labels to Ray node on start up, or dynamically change node's label through Ray scheduling APIs.
5
+
6
+
Labels mechanism makes it easy to implement Actor and Node affinity.(Taints and Tolerations style)
6
7
7
8
8
9
### Should this change be within `ray` or outside?
@@ -19,32 +20,95 @@ Yes, this will be a complement to ray core's ability to flexibly schedule actors
19
20
## Design and Architecture
20
21
21
22
### Brief idea
22
-
1. Introduce the concept of Label. Add the Labels attribute to Actor/Task/Node. Labels = Map<String, String>.
23
-
2. After Actor/Task are scheduled to a certain node, the Labels of Actor/Task will be attached to the node resource(Named: LabelsResource). Node's Labels are naturally in the node resource.
24
-
3. Actor/Task scheduling can choose Actor/Task/NodeAffinitySchedulingStratgy.
25
-
4. The actual principle of Actor/Task/NodeAffinitySchedulingStratgy is. According to the label matching expression in the strategy, traverse and search for LabelsResource of all nodes. Pick out nodes that meet the expression requirements.
23
+
1. Introduce the concept of Label. Add the Labels attribute to Actor/Node. Labels = Map<String, String>.
24
+
2. After Actor are scheduled to a certain node, the Labels of Actor will be attached to the node resource(Named: LabelsResource). Node's Labels are naturally in the node resource.
25
+
3. Actor scheduling can choose Actor/NodeAffinitySchedulingStratgy.
26
+
4. The actual principle of Actor/NodeAffinitySchedulingStratgy is. According to the label matching expression in the strategy, traverse and search for LabelsResource of all nodes. Pick out nodes that meet the expression requirements.
Personally, I think this Option is not as good as the above Option 1.
100
+
The label_in(key, values, is_soft) form of option 1 is more understandable and better than the form of ("location", LabelMatchOperator.IN, ["dc_1"], false).
0 commit comments