Multiplexing
As mentioned before, HTTP/1.x doesn’t allow you to do multiple parallel requests in the same TCP connection. At most, with HTTP/1.1 you’ll be able to do multiple requests, but the responses will need to be received in the same order, inducing Header-of-Line blocking.
HTTP/2 and its binary convention allows you to multiplex requests and responses in the same connection so you can take full advantage of the network’s resources.
Here’s how the frame transfer in a HTTP/2 connection looks like:
Once you give the possibility to HTTP/2 to multiplex all the frames among all the streams, some kind prioritization needs to take place, for the communication to carry out. There are two notions for prioritizing resources on the network:
- Dependency among streams: each stream is affected to its parent stream (or none). Of course, the parent will have priority over the son. The son won’t have any resource until the parent has been sent.
- Each stream has...