Issue
If an actor becomes a bottleneck for a Ray application, is there a way to replicate it and using the load balancing logic?
Using an actor as a service (by passing actor handles into Ray tasks), it creates use cases s.t. instead of the whole state/data belonging to an actor, and that state could be split into multiple actors in favor of the availability.
Is there a built-in tool, a common practice or a workaround for that, or does this have to be handled manually?
Solution
It turns out that the round robin logic is valid in this case. While passing replicated actors' handles to Ray tasks, actors can be distributed with round robin load balancing in mind.
E.g., if we have 150 Ray tasks (or worker actors) that will use 15 state holder actors' handles, we could basically;
StateHolderActors = [StateHolder.remote() for _ in range(15)]
futures = [task.remote(StateHolderActors[i % 15], *args) for i in range(150)]
Answered By - M.Erkin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.