4 ms·
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
by merb 8y ago
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.
- bluejekyll 8y agoWhat do you mean by stateful in this context? 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.
- merb 8y agoThe whole protocol has state, because that's the only way to multiplex multiple data streams over a single connection. i.e.: https://http2.github.io/http2-spec/#StreamStates https://http2.github.io/http2-spec/#StreamStates of course the "user layer" is stateless, but the whole connection handling is a state machine (which actually http/0.9-1.1 wasn't)
- manigandham 8y agoHTTP2 is stateless. It follows the same semantics as HTTP to be a generic stateless protocol. TCP has stateful connections, but both HTTP versions are being sent over TCP anyway so in that sense the transport was always stateful.
- adev_ 8y ago> HTTP2 is stateless. It follows the same semantics as HTTP to be a generic stateless protocol. It is not currently. HTTP/2 header compression is stateful. HTTP/2 is a protocol that appear stateless to the end user.
- Ayesh 8y ago> but stateful connection management comes with a cost, especially on tcp. Keep-alive isn't any better. In Apache bad nginx, keep-alive and http/2 parallel requests are handled at a separate thread and hardly adds any noticeable load.