HTTP History
In 1989, the hypertext transfer protocol have been invented. HTTP/1.1 has been released in 1997 and took the longest pause in evolution. In 2015, Google has redrafted its inhouse SPDY protocol to HTTP/2 to optimize the web page load time.
HTTP/1.1 Pitfalls
- Too heavy and big protocol. Too many parts have been added as optional led to complicating the protocols with less of usage.
- Since HTTP1.1 release, web technology have seen tremendous change. Page size has been increased to MBs, the number to pages increased manifolds and parallel components making HTTP calls increased too.
- Each HTTP request has a separate TCP connection and its handshake does add to page load time.
- Head of line blocking has slowed the page load. We can have a maximum 8 parallel connection to the same domain. Due to increase in multiple components making separate HTTP calls, this has been a bottleneck.
HTTP/2 Solution
- Binary framing layer: HTTP/1.1 was text-only messaging, which was not efficient. HTTP/2 has support for binary formatting messaging which compact the message size and improve the data transfer rate.
- Streaming solves head of line clocking problem by loading multiple packets for a single request. So instead of making multiple calls, the same data can be fetched in single-stream,
- HTTP/2 supports server push where the server can pass additional information in anticipation of future requirement.
Comments
Post a Comment