View profile

What's HTTP/2? - Software Shots - Issue #8

What's HTTP/2? - Software Shots - Issue #8
By Karn • Issue #8 • View online
Hello, I know it’s late. This weekend has been a hectic one. Hopefully, it’s monday morning when you’re reading it.

Let’s get hands on, go to this website to see the performance diference between HTTP/1.1 and HTTP2.
HTTP/2 is the newer standard for internet communications that address common pitfall of HTTP/1.1 on modern web pages.
Before we get to HTTP/2, let’s have a look at its predecessor to understand the differences.
How HTTP/1.1 works?
It was released in 1997. It has worked great for many years! But the internet also changed at the same time but the standard never did.
  • The protocol open a new TCP connection to a server at each request.
  • It does not compress headers, i.e. all in plain text.
  • It only works with Request / Response mechanism, i.e. no server push possible.
Originally HTTP was composed of just two commands:
  • GET: to ask for content
  • POST: to send content
Overtime, some verbs have been added. But these were the only ones originally.
Now-a-days, a web page loads 80 assets (html/css/js/images) on average. And headers are sent at every request and are PLAINTEXT, which are heavy in size. Each request opens a TCP connection, (i.e. 80 times) this leads to certain inefficiencies which add to latency and increased packet size.
http1.1 client serevr
http1.1 client serevr
How HTTP/2 works?
Release in 2015, but has been battle tested for many years by Google under the name SPDY.
  • It supports multiplexing: The client & server can push messages in parallel over the same TCP connection.
  • This greatly reduces latency.
  • It also supports server push, i.e. Servers can push streams (multiple messages) for one request from the client. The client doesn’t need to ask for multiple data.
  • This saves a lot of round trips.
  • HTTP/2 supports header compression, i.e. smaller packet size.
  • It is binary. While HTTP/1.1 text makes it easy for debugging, it’s not efficient over the network.
  • Any binary protocol is a great match for HTTP2. For example, protocol buffers.
  • It is secure. (SSL is not required but recommended by default)
These protocols came into existence as seen by the reliability of the internet. Earlier, internet was not stable enough to hold a single tcp connection for long. Now a days, the internet is reliable enough to leverage UDP instead of TCP for communication. And hence, the birth of HTTP/3.
  • HTTP/3 runs over QUIC – an encrypted general-purpose transport protocol that multiplexes multiple streams of data on a single connection.
  • QUIC was initially developed by Google. The protocol utilizes space congestion control over User Datagram Protocol (UDP).
That’s it for the weekend. If you liked reading it, make sure you forward this to your friends.
Last week in "Did you have a look at X?"
So technically you can simply go over to and click on “last week” to look at the same.
I’ll turn this section into the progress we’ve made on the side project. Probably going by the “build in public” fad quite literally. Please let me know if this section is better or the last one with list of links was better?
So last week’s (mostly weekend) progress.
  • Had applied for AWS Activate. Got in, no deployment costs for like two years. Anyways we haven’t paid a penny till now, apart from buying the domain.
  • Upvote/Downvote had not been implemented. It was a very stupid frontend cookie implementation to just push the website out. Fix in progress (probably will deploy tomorrow night).
  • Registered the product on IndieHackers. 😉
  • Worked on a bookmark feature for lookatx, where users can easily save a particular post and not lose it. May be like a reading list. Only the UI has been done, I can show you a sneak peek.
minimalist, eh?
minimalist, eh?
  • Small thing but added a cookie notification, did you check out our privacy policy?
That’s about it! Amazing you stayed till here! So how about replying to this mail and letting me know, whether this section is better or the last one was?
If you’re new to the newletter, nevermind. Have an awesome week. :)
Ciao! 👋 
Did you enjoy this issue?
By Karn

I build and create things. As of now, I work as a Software Engineer at SendX/SendPost.

If you don't want these updates anymore, please unsubscribe here.
If you were forwarded this newsletter and you like it, you can subscribe here.
Powered by Revue
Gyan Karn, Delhi, India - 110039