Stop Wasting Connections, Use HTTP Keep-Alive
1–10 of 112 posts
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#2One more reason to do so: if you use client side TLS auth with a cert (or moreover a slow smartcard,) reauthenticating every connection will grind your performance to pieces.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#3The 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.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#4Sure, if Apple have fixed their issues with Keep-Alive for Safari:
https://stackoverflow.com/questions/25372318/error-domain-ns...
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#5Better yet.. switch to http2 (where keep-alive is deprecated):
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Ke...
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#6The benchmarks say "to make 1000 HTTP requests", but I wanna know for sure if it was `https` (SSL) or not.
The SSL connection init costs are real, although SSL session re-use can help there even without keep-alive.
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#7My understanding was that with http/1.1 all connections are kept alive until a close is emitted. How is this different?
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#8The benchmarks say "to make 1000 HTTP requests", but I wanna know for sure if it was `https` (SSL) or not. The SSL connection init costs are real, although SSL session re-use can help there even without keep-alive.
These metrics were collected for HTTPS specifically. I've omitted the URL I used in the benchmark scripts, but am using an HTTPS agent. Scripts live here: https://github.com/mgartner/node-keep-alive-benchmark
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#9The benchmarks say "to make 1000 HTTP requests", but I wanna know for sure if it was `https` (SSL) or not. The SSL connection init costs are real, although SSL session re-use can help there even without keep-alive.
[deleted]
Re: Stop Wasting Connections, Use HTTP Keep-Alive
#10Unfortunately most people's primary computing devices are smart phones and smart phone radios cannot keep a TCP connection open, or won't, because of power usage.