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

Improve ZeroMQ ReqServer load-balancing #67215

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfindlay
Copy link
Contributor

@jfindlay jfindlay commented Feb 1, 2025

Salt currently uses a Broker socket to distribute incoming requests to MWorkers using a round-robin discipline, which doesn't take into account if the worker is already busy and will not be able to serve the request in a timely manner. This patch is based on the recommended ZMQ load-balancing pattern, which flips it to a Router socket that idle MWorkers will pull from. This resolves the SaltReqTimeout issues in testing and gets us better visibility into the utilization of workers.

What does this PR do?

What issues does this PR fix or reference?

Fixes

Previous Behavior

Remove this section if not relevant

New Behavior

Remove this section if not relevant

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

Salt currently uses a Broker socket to distribute incoming requests to
MWorkers using a round-robin discipline, which doesn't take into account
if the worker is already busy and will not be able to serve the request
in a timely manner. This patch is based on the recommended ZMQ
[load-balancing pattern](https://zguide.zeromq.org/docs/chapter3/#A-Load-Balancing-Message-Broker),
which flips it to a Router socket that idle MWorkers will pull from.
This resolves the SaltReqTimeout issues in testing and gets us better
visibility into the utilization of workers.
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.

2 participants