Repository navigation
Reuse connections in engine health probes - #35
Merged
Merged
Conversation
The broker's Ollama, LM Studio and oMLX health checks and the engine manager's readiness probe closed each response body without reading it. Go's HTTP/1 transport only returns a connection to the pool once its body reaches EOF, so every poll opened a new connection to the engine. Drain a bounded amount of each body before closing it (shared httpcon.DrainAndClose), so one connection serves every poll. Ported from NVIDIA/Personal-AI-Router@5ae90de (NVIDIA#37), which fixed the Ollama path; extended to this fork's LM Studio and oMLX probes. Co-authored-by: Psych0h3ad <41975091+Psych0h3ad@users.noreply.github.com> Signed-off-by: Jared Ping <13906915+JaredP94@users.noreply.github.com>
JaredP94
force-pushed
the
fix/probe-connection-reuse
branch
from
November 2, 2026 18:57
45a95b3 to
878251b
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The broker's Ollama, LM Studio and oMLX health checks and the engine manager's readiness probe closed response bodies unread. Go's HTTP/1 transport only pools a connection whose body reached EOF, so every poll opened a new connection. Bodies are now drained (bounded at 1 MiB) before closing, via a shared
httpcon.DrainAndClose.Ported from NVIDIA/Personal-AI-Router@5ae90de (NVIDIA#37), which fixed only the Ollama path; extended to the LM Studio and oMLX probes.
Validation
go test ./...inshared(new test: 16 polls use 1 connection, for both Content-Length and chunked bodies),nvpair-ui-broker,nvpair-engine-manager.Risk
Low. ui-broker 2.5.0, engine-manager 1.4.0.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.json, and described user-visible changes above so they reach the release notes.Part of the upstream issue/PR review. Each branch is independent off
main; they all bumpservices/versions.json, so the second one merged will need a trivial conflict resolution there.