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

Graceful shutdown server persistent connections with 408 #61873

Open
CheSema opened this issue Mar 25, 2024 · 0 comments
Open

Graceful shutdown server persistent connections with 408 #61873

CheSema opened this issue Mar 25, 2024 · 0 comments

Comments

@CheSema
Copy link
Member

CheSema commented Mar 25, 2024

Lets consider to implement this approach to close connection gracefully?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408

There is a race condition between client and server. Client could still try to use already closed connection. It results in ugly error "No message received" or similar and retries. That could be disturbing and looks trashy. We saw that with s3. To avoid that case server could send 408 even to the idle connection right before closing it. Mozila does that, the link from it.

That race condition could be severe problem in case of max_keep_alive_requests. For example client does not honor it and keeps sending requests. At max_keep_alive_requests+1 request client receives an error.

max_keep_alive_requests introduced in #61793 (comment)_

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

No branches or pull requests

1 participant