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

net/http: send and understand the hop-by-hop Keep-Alive header #15508

Open
bradfitz opened this Issue May 2, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@bradfitz
Member

bradfitz commented May 2, 2016

Now that we have net/http.Transport.IdleConnTimeout we could also advertise our timeout to the peer:

https://tools.ietf.org/id/draft-thomson-hybi-http-timeout-01.html#rfc.section.2

It's a little useless for the client to send it, but perhaps the server could take care not to close the connection just before (~second) of the client's announced close time, just in case the client was about to send something as the server would have otherwise closed.

Independently, and more usefully, the server could announce its keep-alive idle time (once it exists: #14204) and the client could respect it.

@bradfitz bradfitz added this to the Unplanned milestone May 2, 2016

@bradfitz

This comment has been minimized.

Member

bradfitz commented Jul 25, 2016

Apparently this is seen in the wild only about 0.2% of the time and servers have stopped(?) using it. nginx might still send it? Apache used to and stopped?

So this might be lower priority.

@bradfitz

This comment has been minimized.

Member

bradfitz commented Jul 25, 2016

Reportedly: "AmazonS3 sends Keep-Alive: timeout=10"

@bradfitz

This comment has been minimized.

Member

bradfitz commented Jul 25, 2016

11:40 < igrigorik> re Keep-Alive: it appears (at least based on HTTP Archive data) that ~17% of responses provide Keep-Alive (!!).. 5s is ~7%, 15s is ~2%. 
                   More data here: https://discuss.httparchive.org/t/use-of-keep-alive-header-on-the-web/794

https://discuss.httparchive.org/t/use-of-keep-alive-header-on-the-web/794

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment