Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update queue_lens on generation ends. #3490

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

lcw99
Copy link
Contributor

@lcw99 lcw99 commented Aug 22, 2024

When using the SHORTEST_QUEUE method for load balancing, an issue arises because the queue_length isn't updated when a generation task ends. This leads to inaccurate load balancing across worker processes. To address this problem, I implemented two improvements:

  1. Added a heartbeat signal that's sent when a generation task completes, ensuring the queue length is updated accurately.
  2. Introduced a random selection process for breaking ties when multiple queues have the same length.

These changes should result in more effective and balanced distribution of work across all available worker processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant