Repository navigation
fix: [stable-9.0][OCISDEV-1724] reuse HTTP connections in the proxy - #13542
Merged
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
2403905
marked this pull request as ready for review
November 20, 2026 14:49
Under high load, the proxy opened a new connection for most requests. The host ran out of ports. This caused failed logins and failed requests. 1. The backend transport keeps up to 100 idle connections for each backend. Before, it kept 2. It has no global limit for idle connections. 2. The OIDC client keeps its connections alive. Before, it opened a new connection with a new TLS handshake for each call. 3. Both close an idle connection after 30 seconds. Before, the proxy used 90 seconds. A load balancer or an ingress controller often closes an idle connection after 60 seconds. The proxy must close first. 4. Bump reva to get the same fix for the reva HTTP clients (owncloud/reva#826). Tests send two bursts of parallel requests. The second burst reuses the idle connections of the first burst. Backport of #13539. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
Reva merged the fix for the HTTP clients. Point go.mod to the merge commit. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
force-pushed
the
fix/9.0/OCISDEV-1724
branch
from
November 20, 2026 14:53
dde1acc to
e8ed124
Compare
2403905
enabled auto-merge (squash)
November 20, 2026 14:55
deyankiteworks
approved these changes
Nov 20, 2026
LarsJurgensen
approved these changes
Nov 20, 2026
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.
Backport of #13539 to
stable-9.0.Problem
Under high load (k6 mixed test, 300 VUs), the proxy opens a new connection for most requests. The host runs out of ports. This causes failed logins and failed requests.
Ticket: OCISDEV-1724. The load test numbers and the analysis are in the ticket.
Change
services/proxy/pkg/proxy/proxy.go: the backend transport keeps up to 100 idle connections for each backend. Before, it kept 2. It has no global limit for idle connections.services/proxy/pkg/command/server.go: the OIDC client keeps its connections alive. Before, it usedDisableKeepAlives: true.go.mod: bump reva to the commit of fix: [stable-9.0][OCISDEV-1724] reuse HTTP connections in the reva clients reva#826. This PR has the same fix for the reva HTTP clients.Difference from #13539
stable-9.0, the OIDC client setsProxy: http.ProxyFromEnvironment. The new functionnewOIDCHTTPClientinservices/proxy/pkg/command/server.gokeeps it.stable-9.0, the proxy wraps its transport inautoprop.NewHttpRoundTripper.services/proxy/pkg/proxy/proxy.gokeeps this wrapper.stable-9.0has a local patch invendor/github.com/owncloud/reva/v2/pkg/storage/utils/decomposedfs/metadata/(ErrAttrUnset). Revastable-9.0does not have this patch.go mod vendorremoves it, so I restored these files. The patch stays unchanged.Reva bump
The bump also brings these reva commits:
Tests
go test -racefor./services/proxy/.... All tests pass../ocis/cmd/ociswith-mod=vendor.Before merge
This PR is a draft.
go.modpoints to the commit of the open reva PR owncloud/reva#826. After that PR is merged, bump reva again to the merge commit.🤖 Generated with Claude Code