DEV Community

Bhupesh Chandra Joshi
Bhupesh Chandra Joshi

Posted on

One Request , Two Request and none stop server: HTTP PIPELINING:

what is the behind the curtain ? When you open a website what happens the behind the scene. We will imagine the internet city,
how clients works on the internet city.

There is a city where a person named client resides and client has a work to collect the information from people.

When client visits a extremely big office named server, He says

I need-HTML
I need- CSS
I need- JS
I need- IMAGES

OLD WAY:(HTTP/1.0 -One by one request):

The client was very decent/well-behaved previously.
He sends one request and waites for response politely.

First HTML Arrives
THEN CSS Arrives
THEN JS Arrives
THEN IMAGES Arrives at the end point.

If server becomes slow, client have no choice for wait.

TEAM notices the problem in team ,they came with the solution and
HTTP pipelining wasn't introduced by a single person but emerged as a feature within HTTP/1.1, a significant revision of the protocol developed by the IETF (Internet Engineering Task Force).

Let's continue the story, client thought why to waste time,why not I send all requests together.

You can take example of developers when they don't pick call,then hrs call them regularly,Think HR (HR is client and developer is server,server can take time to process the task.)

This is how the HTTP pipelining was originated,

What is HTTP Pipelining?

Client can send the multiple requests all together single HTTP connection, without waiting for response of multiple requests.

Now client is advanced ,we need

HTML,CSS,JS and IMAGES ALL together.

IDEA was good,In theory it can make web fast.

There is a twist in the story,

1️⃣ Head-of-Line Blocking
2️⃣ THERE will be no support for server and proxies.
3️⃣ Browsers lost the trust

Browsers disabled the http pipelining.

So,HTTP PIPELINING is a failure.

What we learned from HTTP Pipelining?

1- IT's not sufficient to send request parallel.
2- Responses should handle independently.
3- It's not recommended to add patch on top of tcp.
4-Protocol level should be shifted.

next evolution is HTTP/2:

Engineers said ,we should make it perfectly.

What HTTP/2 introduced?

🚀 Multiplexing (Largest change)
Multiple requests and
Multiple responses on single connection ,without order,
Server and client send data based on packets/ chucks.

Now slow request can't block fast request.

🚀 Binary Framing

  • HTTP/1.x text-based
  • HTTP/2 binary-based

Benifit

  • Faster parsing

  • Less errors

  • Better optimization

HTTP Pipelining failed not because the idea was wrong,
but because the web needed a stronger protocol, not a workaround.

Top comments (0)