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

Reuse connections for 5xx errors #5607

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zoewangg
Copy link
Contributor

Motivation and Context

Reuse connections for 5xx errors for all supported HTTP clients. This change reverts #1768 and #2960

@jtjeferreira
Copy link

Hi @zoewangg,

I am working on an AWS SDK Http client based on pekko here, and the only failing test from SdkAsyncHttpClientH1TestSuite is connectionReceiveServerErrorStatusShouldNotReuseConnection which I am ignoring for now.

Luckily I stumbled upon this PR, and I am just wondering why this functionality is being reverted?

@zoewangg
Copy link
Contributor Author

Hi @jtjeferreira, we are still evaluating the change. The main reason is that closing connections for 5xx errors could cause more TCP connection establishment in the unlikely event of outage, which could add request latency and add more load on the server side. In general, we try to keep custom logic in the SDK minimal and let the server side decide if a connection should be kept open or not.

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