What is the difference between HTTP/1.1 pipelining and HTTP/2 multiplexing?

prasun picture prasun · Dec 27, 2015 · Viewed 11k times · Source

Is it because it requires the responses to be made to client in the order of request that causes the head of line blocking problem in HTTP 1.1?

If each request takes exactly an equal amount of time, then there won't be head of line blocking and HTTP 1.1 pipelining and would perform same as that of HTTP/2 multiplexing?

(let's say there is no request priority in HTTP/2 requests and disregard other changes of HTTP/2 such as header compression, binary, etc.)

Answer

Elijah Lynn picture Elijah Lynn · Apr 6, 2016

HTTP/1.1 without pipelining: Each HTTP request over the TCP connection must be responded to before the next request can be made.

HTTP/1.1 with pipelining: Each HTTP request over the TCP connection may be made immediately without waiting for the previous request's response to return. The responses will come back in the same order.

HTTP/2 multiplexing: Each HTTP request over the TCP connection may be made immediately without waiting for the previous response to come back. The responses may come back in any order.