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).

Sign up to request clarification or add additional context in comments.

3 Comments

@Matt you +1ed the answer, because the question contained an awesome diagram? Or maybe you only attached your comment wrongly...
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?
How about HTTP chunked transfer mode?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.