Monday, July 17, 2017

Http 2.0

HTTP 2 is a binary transfer protocol which addresses the Short comings of its predecessor with full request and response multiplexing, compression of HTTP header fields, and add support for request prioritization and server push.

Shortcomings of H1 (HTTP 1.1) and Work Arounds

One Request Response Cycle per TCP Connection
   Work around with Multiple TCP Connection (4-8 Connections) and it worked now you   could send 4-8 Parallel Request over Multiple TCP Connection to the Server 

Cost of Multiple TCP Connections

 Sockets both at Client and Server Consumes a lot of Resource, extra memory Buffers and CPU overhead. Bandwidth Sharing Issue between Parallel TCP Streams.

More Workarounds

·        Domain Sharding: Faking Domains to acquire More Parallel Request
·        Image Spiriting, JavaScript and CSS file Concatenations
·        Vulcanizing:  Concatenating your web Components and more

HTTP2 to the rescue:

Since it enables Multiplexing (Multiple Requests Response Cycles in parallel over a single TCP Connection) all the Workarounds mentioned above can be avoided.

 

 

Header Compression

Each HTTP transfer carries a set of headers that describe the transferred resource and its properties. In HTTP 1.x, this metadata is always sent as plain text and adds anywhere from 500–800 bytes of overhead per request, and kilobytes more if HTTP cookies are required To reduce this overhead and improve performance, HTTP 2.0 compresses header metadata.

Request Prioritization with h2

To accelerate the load time of the page, all modern browsers prioritize requests based on type of asset, its location on the page, and even learned priority from previous visits.
HTTP 2.0 does not specify any specific algorithm for dealing with priorities, it just provides the mechanism by which the priority data can be exchanged between client and server (FRAME PRIORITY ID’s). None of the major Webserver has this implementation.

Server Push

A powerful new feature of HTTP 2.0 is the ability of the server to send multiple replies for a single client request. That is, in addition to the response for the original request, the server can push additional resources to the client without the client having to explicitly request each one.

0 comments:

Post a Comment