Repository navigation
fix: [stable-8.0][OCISDEV-1724] reuse HTTP connections in the proxy - #13539
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
force-pushed
the
fix/8.0/OCISDEV-1724
branch
from
November 20, 2026 11:42
0ca6477 to
7f94332
Compare
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. The deprecated field DualStack is removed. It has no effect. Tests send two bursts of parallel requests. The second burst reuses the idle connections of the first burst. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
… dialer The field DualStack of net.Dialer is deprecated and has no effect. This pull request does not change it. A separate ticket covers the dialer settings. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Roman Perekhod <[email protected]>
2403905
force-pushed
the
fix/8.0/OCISDEV-1724
branch
from
November 20, 2026 11:42
7f94332 to
17c76d9
Compare
2403905
marked this pull request as ready for review
November 20, 2026 11:43
mzner
approved these changes
Nov 20, 2026
mklos-kw
approved these changes
Nov 20, 2026
deyankiteworks
approved these changes
Nov 20, 2026
2403905
enabled auto-merge (squash)
November 20, 2026 11:59
This was referenced Nov 20, 2026
2403905
added a commit
that referenced
this pull request
Nov 20, 2026
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]>
2403905
added a commit
that referenced
this pull request
Nov 20, 2026
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#825). 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]>
2403905
added a commit
that referenced
this pull request
Nov 20, 2026
* fix: [OCISDEV-1724] reuse HTTP connections in the proxy 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#825). 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]> * fix: [OCISDEV-1724] bump reva to the merge commit 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]> --------- Signed-off-by: Roman Perekhod <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2403905
added a commit
that referenced
this pull request
Nov 20, 2026
…13542) * fix: [stable-9.0][OCISDEV-1724] reuse HTTP connections in the proxy 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]> * fix: [OCISDEV-1724] bump reva to the merge commit 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]> --------- Signed-off-by: Roman Perekhod <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
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. In a deployment with one pod for each replica, each pod is one host.services/proxy/pkg/command/server.go: the OIDC client keeps its connections alive. Before, it usedDisableKeepAlives: trueand opened a new connection with a new TLS handshake for each call.PUT,POSTorPROPFINDrequest on a connection that the other side closed.Tests
go test -racefor./services/proxy/.... All tests pass.Not in this PR
DualStackof the dialer and the MPTCP settings stay unchanged. A separate ticket covers them.go.mod.canCreateSpacein the graph service still turns a settings error into a 403. This is a separate fix.🤖 Generated with Claude Code