-
Notifications
You must be signed in to change notification settings - Fork 8k
[serve] Production defaults for HAProxy connect timeout and dead-replica detection #65729
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
Open
harshit-anyscale
wants to merge
7
commits into
ray-project:master
Choose a base branch
from
harshit-anyscale:serve-production-safe-defaults
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5ce6006
[serve] Production defaults for HAProxy routing at fleet scale
harshit-anyscale 392912f
Merge branch 'master' into serve-production-safe-defaults
harshit-anyscale 6427443
[serve] Correct the leastconn rationale on the balance default
harshit-anyscale 58d56ab
[serve] Drop a no-op mock from the HAProxy defaults test
harshit-anyscale d596f13
[serve] Revert the balance default back to leastconn
harshit-anyscale 10b930d
[serve] Revert the reload coalesce default back to 0.1
harshit-anyscale fe769b1
[serve] Document how to disable the HAProxy connect timeout
harshit-anyscale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does one disable this?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set it to
0. Documented in the comment as of fe769b1.Details
get_env_int_non_negativeaccepts0(it validates>= 0), and the template gates onis not none, soRAY_SERVE_HAPROXY_TIMEOUT_CONNECT_S=0renderstimeout connect 0s. HAProxy stores an unset timeout as0internally, so that is indistinguishable from omitting the directive — in 2.8:proxy_parse_timeoutaccepts a literal0(only sub-millisecond non-zero values are rejected, asPARSE_TIME_UNDER: "minimum non-null value is 1 ms"), then assigns*tv = MS_TO_TICKS(0)==0.!curproxy->timeout.connect(cfgparse.c), so0and unset take the same branch.if (!timeout.queue) timeout.queue = timeout.connect, which copies the same0either way — so no divergent side effect from the fact that Serve leavestimeout queueunset.Confirmed against a running HAProxy with a blackholed backend, config identical apart from this one line:
So
=0restores the previous behaviour exactly: infinite connect timeout, and the samemissing timeouts for backend ...startup warning that omitting it produced.Caveat on the runtime check: that was HAProxy 3.4.4 locally, since that is what I can run on macOS. The source references above are from 2.8, which is what
ray-haproxyships.🤖 Investigated and drafted with Claude Code