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

close quic connections when server closes #6202

Merged
merged 3 commits into from Mar 29, 2024
Merged

Conversation

WeidiDeng
Copy link
Member

Fix 6195.

@WeidiDeng WeidiDeng requested a review from mholt March 29, 2024 02:24
Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is a good temporary solution I think. Thank you @WeidiDeng!!

@mholt mholt merged commit 924010c into master Mar 29, 2024
25 checks passed
@mholt mholt deleted the close-h3-connections branch March 29, 2024 17:51
@mholt mholt added the bug 🐞 Something isn't working label Mar 29, 2024
@mholt mholt added this to the v2.8.0 milestone Mar 29, 2024
@francislavoie
Copy link
Member

francislavoie commented Mar 29, 2024

This means that h3 requests get cancelled non-gracefully on reload, right? Doesn't that differ from how we typically handle reloads? Does that ignore the grace config in global options https://caddyserver.com/docs/caddyfile/options#grace-period ?

@mholt
Copy link
Member

mholt commented Mar 29, 2024

Yeah, I think so. I believe it is a TODO, waiting for a graceful close method upstream in quic-go.

I believe what this does -- correct me if I'm wrong @WeidiDeng -- is when a new HTTP request comes in on a server that was just closed, it will close the QUIC connection with the client. The socket remains open, however.

@marten-seemann Does that sound about right? Once a graceful close is implemented we should be able to allow existing requests to finish during a grace period I think?

@WeidiDeng
Copy link
Member Author

Speaking of request interruption, I think my previous approach to interrupt a stream had the same problem (the quic connection is forcefully closed). I'll take a look at that and graceful shutdown when I have time.

@mholt
Copy link
Member

mholt commented Mar 31, 2024

Thanks Weidi, that'd be great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delay in Caddy using changes to reverse_proxy upstream
3 participants