Stop Wasting Connections, Use HTTP Keep-Alive
31–40 of 112 posts
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#32Earlier quoted context omitted.
Its amazing that not everyone is on http2 yet when its basically free speed.
I’m not amazed. While many stacks support it, most organizations still have lift on their end to implement this behind the other “priority” customer change requests.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#33Re: Stop Wasting Connections, Use HTTP Keep-Alive
#34So I've been writing a web server recently (mostly for learning purposes of HTTP and web stuff again as I've been out of that field for over a decade), and I've discovered that Firefox seems to be the only browser I've tried which still really utilises it fully and respects the headers: Safari sort of does, but only ever once, regardless of the header params, and Chrome never does, again, regardless of what the Conne…
These tickets talk about pipelining, not keep-alive. The chrome link specifically points out why they decided to disable it. Chrome and Firefox still support regular keep-alive and do reuse connections on http 1.1
Firefox most definitely is utilising it fully, and obeys the Keep-Alive params specified, which I can't see any of the other browsers doing.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#35Better yet.. switch to http2 (where keep-alive is deprecated): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ke...
of course, because http2 is stateful and whenever the server or client whishes, they can send a close message. but stateful connection management comes with a cost, especially on tcp.
Http/2 is multiplexed, unlike http/0.9-1.1, and while that has some overhead, it being a binary protocol probably makes up for it.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#36Better yet.. switch to http2 (where keep-alive is deprecated): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ke...
Is it easy for Django/Rails/ExpressJS to implement Http2 in their next release?
Now, if you want to take advantage of HTTP/2 features like server push that's another story.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#37The hidden danger, mentioned in the article, is if the client sends a second request while the server closes an idle connection. Until http/2, the client can't tell if the server closed the connection before or after it received the request. Many servers send a hint about the idle time out, but few client libraries process it (that I've seen). The larger the latency between server and client, the bigger deal this is.
Pipelining might amplify it, but it is always there, especially with unreliable mobile connections.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#38Re: Stop Wasting Connections, Use HTTP Keep-Alive
#39Better yet.. switch to http2 (where keep-alive is deprecated): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ke...
of course, because http2 is stateful and whenever the server or client whishes, they can send a close message. but stateful connection management comes with a cost, especially on tcp.
TCP has stateful connections, but both HTTP versions are being sent over TCP anyway so in that sense the transport was always stateful.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#40Better yet.. switch to http2 (where keep-alive is deprecated): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ke...