Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general
communitycreator

What is HTTP/2 ?

Tarun Telang

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Introduction to HTTP

HTTP stands for HyperText Transfer Protocol. This network protocol is one of the most important and fundamental protocols of the World Wide Web today.

Originally, HTTP was designed to serve simple web pages where requests were expected to mainly respond with only one artifact, such as a plain HTML page with a collection of hyperlinks.

Limitations of HTTP

Today, the web has grown to become very complex. Nowadays, it is very common for a single web page to contain multiple resources such as images, style sheets, scripts, audio, video, and much more.

Retrieving these resources using the same old protocol, where a separate HTTP request is expected to fetch just one artifact, often leads to lower performance and increased network latency.

Primary goal of HTTP/2

HTTP/2 (originally known as HTTP/2.0) is a major protocol enhancement with a primary goal to reduce network latency and improve performance. Most major browsers have been supporting this new HTTP/2 protocol for more than 5 years.

New features in HTTP/2

Below is the list of new features in HTTP/2:

  • Data Compression of HTTP header fields for the reduction in protocol overhead - HTTP/2 uses binary framing for significantly improved bandwidth usage, as well as data compression and header sharing across related resources.

  • HTTP/2 Server Push - A mechanism in which a server can be configured with a rule to initiate pushing of all dependent resources through the initial page request itself, even before the browser parses HTML of the web page. This needs to be used with extra care as it may result in wasted bandwidth if the pushed resource does not get consumed by the client.

  • Full Multiplexing of request and response along with request prioritization - HTTP/2 allows the transfer of multiple resources from the server to be multiplexed into separate prioritized streams within a single initial TCP connection.

Due to the new binary framing layer, which is where compression of headers happens, HTTP/2 protocol is not backward compatible with its earlier versions on either server or client-side. Initially, a major protocol version update to HTTP/2 was planned instead of just a minor increment to its earlier versions.

Earlier versions of HTTP protocols are HTTP/1.2 and HTTP/1.1.

RELATED TAGS

general
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring