54

Thanks to Google and Stack Overflow, I think I understood the difference between regular HTTP pipelining and HTTP multiplexing (e.g., with SPDY), so I made the diagram below to show the differences between pipelining and multiplexing based on three regular HTTP requests.

enter image description here

My two questions are:

  1. Is the image correct?
  2. Is it true that if pipelining would not have the head-of-line blocking problem it would be as fast as HTTP multiplexing? Or did I miss an additional difference?

1 Answer 1

51

It's not incorrect, but there is an important aspect it omits. HTTP requires that you deliver the entire response before any other request can proceed. What you're showing in the diagram is correct in the sense that with SPDY we can finally break the "head of line" requirement and deliver the responses as they become available. However, we also don't have to wait for any request to complete entirely.

Imagine two requests, both several kb's in size: each request will have multiple packets, call them [r1p1, r1p2] and [r2p1, r2p2]. HTTP requires that pN's arrive in exact order. SPDY, on the other hand allows us the following: [r2p1, r1p1, r1p2, r2p2].

It's also worth mentioning that with SPDY we can use request priorities to hint the server which requests should take precedence, even if it arrives later on the wire (amongst half a dozen other great features).

3
  • @Matt you +1ed the answer, because the question contained an awesome diagram? Or maybe you only attached your comment wrongly... Apr 21, 2014 at 6:11
  • 1
    What about the 2nd question? > Is it true that if pipelining would not have the head-of-line blocking problem it would be as fast as HTTP multiplexing? Or did I miss an additional difference? May 15, 2015 at 5:41
  • How about HTTP chunked transfer mode?
    – Ricky Jiao
    Mar 28, 2016 at 5:43

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.