[Article] How does multiplexing in HTTP/2 work?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Aprelium Forum Index -> 2.16 Beta [Closed]
View previous topic :: View next topic  
Author Message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1255

PostPosted: Wed Aug 25, 2021 8:26 pm    Post subject: [Article] How does multiplexing in HTTP/2 work? Reply with quote

Let's consider a Web page test.html located at https://example.com/test.html which uses a CSS sheet style.css and includes 3 images a.jpg, b.jpg and c.jpg.

If a HTTP/1.1 browser visits https://example.com/test.html, it will:
  • Open a TCP/IP connection to example.com
  • Negociate an SSL/TLS session
  • Send a request for virtual path /test.html
  • Receive the reply and parse the page
  • Reuse the same connection to send a new request for /style.css
  • Receive the reply
  • Open a TCP/IP connection to example.com
  • Negociate an SSL/TLS session
  • Use the new connection to request /a.jpg
  • Reuse the new connection to request /b.jpg
  • Reuse the first connection to request /c.jpg
  • Close both connections

If a HTTP/2 browser visits https://example.com/test.html, it will:
  • Open a TCP/IP connection to example.com
  • Negociate an SSL/TLS session
  • Send a request for virtual path /test.html
  • Receive the reply and parse the page
  • Send a request for /style.css
  • Send a request for /a.jpg
  • Send a request for /b.jpg
  • Send a request for /c.jpg
  • Receive the replies for all requested files
  • Close the connection

In this small example, HTTP/2 has used a single TCP/IP connection with a single SSL/TLS negociation while HTTP/1.1 required two of each.
The total time to load the page with its dependencies is also shorter.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Aprelium Forum Index -> 2.16 Beta [Closed] All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group