Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Http/2 multiplexing and server push

                 In this article we will see the main features for Http/2 specification. Till Http/1 the Request and response processing between the client and server is simplex. That is, the client sends the request and server processes that , sends response back to the client. Then, client sends another request to server. If any of the request is blocked, then all other requests will have the performance impact. This biggest issue is tackled by introducing the request pipeline in Http/1.1. As part of request pipeline, the request will be sent in an order to the server. Server processes the multiple requests and sends the response back to the client in the same order. Again here the client and server communication is simplex. The below diagram depicts the client server communication happening with Http/1.0 and Http/1.1.

                 Till Http/1.1 the request and response are composed in text format and uses multiple TCP connections per origin. The issues like opening multiple TCP connections per origin, Text format, simplex communication is handled in Http/ 2. Now we will see how Http 2 processes request and responses.

                    The Http/2 uses binary protocol to exchange the data. Http/2 opens single connection per origin and the same TCP connection is used to process multiple requests. Each request will be associated to a stream and the request will be divided into multiple frames. Each frame will have the stream identifier to which it belongs to. The client will send multiple frames belongs to multiple streams to the server asynchronously and the server will process the frames belongs to multiple streams and sends the response asynchronously to the client. The client will arrange the response based on the stream identifier. Here the communication is happening between the client and server simultaneously with out blocking.

              Another Http/2 feature is server push. When client requests for a resource from server, it pushes the additional resources along with the requested resources to the client to cache the data at the client side. This enhances the performance as the client cache is warmed up by the content.

To know further about Http/2 go through the below links.

https://http2.github.io/

https://tools.ietf.org/html/rfc7540

http://royal.pingdom.com/2015/06/11/http2-new-protocol/




This post first appeared on Smart Techie | My Thoughts, My Work, My Ideas, please read the originial post: here

Share the post

Http/2 multiplexing and server push

×

Subscribe to Smart Techie | My Thoughts, My Work, My Ideas

Get updates delivered right to your inbox!

Thank you for your subscription

×