HTTP — Hyper Text Transfer Protocol

What is HTTP

HTTP — is an application layer protocol that allows web-based applications to communicate and exchange data

It is based on TCP/IP

Usage: Originally designed to fetch HTML documents and send it to client.

Difference between HTTP 1.1 vs HTTP2

Shortcomings in HTTP 1.1

Head of line Blocking — HTTP 1. 1 has fixed number of TCP connections — 6 TCP connections per hostname. This means, at the max, only 6 parallel requests can be made to the server. A new request has to wait for the previous request on the same connection to complete before the client can make a new request.

Example: (for 1 TCP connection): Consider, client has parsed the index.html file and has found that it needs, STYLE.CSS & SCRIPT.JS files to load the web page. In this case, client can’t make parallel requests requesting CSS & JS at the same time. First it has to make a request for STYLE.CSS sheet and has to wait for the request to complete before the client can make a new request for SCRIPT.JS.

Header Repetition — Since HTTP 1.1 is stateless, each request which is sent has the header data. This leads to the repetition of headers. Also, the headers cannot be compressed in HTTP 1.1

Solutions in HTTP 2.0 for the above shortcomings

Single TCP connection is used

Multiple streams are created in the above single TCP connection in which every HTTP request is sent as stream. So, client can make a parallel request to the server and doesn’t have to wait for the previous request on the same connection to complete

TLS is mandatory for HTTP 2.0

HPACK — Header data is separated from the actual payload and allows compression

PUSH — Push allows to send mandatory resources in advance

Example -> whenever a client requests for index.html, server can use PUSH and send the script.js, style.css files along with the response for the initial request.

HTTP Version History

HTTP 0.9–(year: 1991) — Originally designed for transferring HTML documents. Had only GET, POST, HEAD methods

HTTP 1.0 — (year: 1996) — PUT, DELETE, LINK and UNLINK methods were introduced

HTTP 1.1 — (year: 1997) — CORS, Keep Alive were introduced.



Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The benefits of a digital ID [ONINO Topics]

Twitter authentication with Go Language and Goth

How to Deploy a Flask Project to a Server?

My experience in bootcamp so far…

Why Flutter Has So Many Issues

A speech bubble

Introduction to Software testing: What is it, Why do we need it and what are the different types?

Dell Wireless Keyboard Y-raq-del2 Driver For Mac

Basic Python Data Structures — Part II

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Muthuramakrishnan M

Muthuramakrishnan M

More from Medium

YIN Finance Bi-Weekly Report: Revealing New Opportunities on Arbitrum

Introducing Midas!

INFORMATIONS ABOUT DOAIBU Doaibu is the decentralized swap and launchpad for tokens based on a…

GalaXY Kats Closed Alpha Test Leaderboard