Re: Overhead of HTTP/2 Stream Management.

On Sun, Apr 05, 2015 at 11:08:50AM -0700, Max Bruce wrote:
> I'm in the process of implementing HTTP/2 into Avuna, and I have a question.
> >From a performance point of view, why do streams maintain a open/close
> state? There seems to be a considerable overhead for it, yet it doesn't
> seem necessary. Think of packet IDs in DNS, it just returns with the same
> ID to say it is a response to a specific request. What is the benefit of a
> detailed stream-like system, versus a simple request/response identifier?

HTTP is a bit more complete than a simple request/response model. For
example when sending a body accompanying a POST, you need to reference
the request the data belong to. Also the push mechanism requires to
associate the pushed requests/responses with an existing request, so
it makes sense to use IDs there as well.

In general, since the streams are multiplexed, I hardly see how you
could get rid of stream IDs. I think you were thinking about the existing
pipeline mode of HTTP/1 which forces all responses to be delivered in the
same order as the requests and which suffers from massive head-of-line
blocking.

With that said, I agree that H/2 is not easy to implement, but for now
my experience is that re-architecturing existing programs to support
multiple streams over a single connection is probably much more
difficult than implementing the protocol itself, though this will
obviously depend on the programs of course.

Regards,
Willy

Received on Sunday, 5 April 2015 18:37:16 UTC