3 ms·
What if you're not running requests in parallel and instead want a pre-warmed tls connection? Something like gRPC could be implemented as a websocket protocol
by jayd16 6y ago
What if you're not running requests in parallel and instead want a pre-warmed tls connection?
Something like gRPC could be implemented as a websocket protocol but you lose all the http semantics for each internal request. You can't expect a load balancer to handle your custom socket protocol but with a standard like http/2 nginx is able to do it.
- CyberRabbi 6y agoThat sounds like a TLS problem and not an http problem. Fortunately TLS has already solved that problem: https://blog.cloudflare.com/introducing-0-rtt/ https://blog.cloudflare.com/introducing-0-rtt/ Though http keepalive seems to already solve your use-case, without TLS 1.3’s connection rtt optimizations, if you indeed aren’t running requests in parallel.
- jayd16 6y ago>Specifically, only GET requests with no query parameters are answered over 0-RTT. Sorry but no. Not solved. They also have a newer post about 0-RTT and how QUIC makes it even faster. https://blog.cloudflare.com/even-faster-connection-establishment-with-quic-0-rtt-resumption/ https://blog.cloudflare.com/even-faster-connection-establish...
- CyberRabbi 6y ago>Specifically, only GET requests with no query parameters are answered over 0-RTT. That only applies to cloudflare’s implementation of 0-rtt. That isn’t a general restriction. Additionally 0-rtt isn’t the only rtt optimization in tls 1.3. Either way your original point was moot since http keepalive is sufficient to avoid tls connection costs for serial requests.