The world-wide-web (aka internet) has come a long way since its early days and so has the protocol that powers it i.e. http.
From simple text based pages to rich interactive applications the way we use the internet has evolved dramatically. To keep up with these changes http has undergone several upgrades each aimed at solving specific challenges. The latest one is http/3.
- http/0.9 (1991): The earliest version designed for simple text based responses. I really have no clue who was using it except a few universities.
- http/1.0 (1996): Introduced headers and status codes but still created a new connection for every request. Some of you might have used early, very popular chat rooms built on that.
- http/1.1 (1997): Brought persistent connections chunked transfer encoding and pipelining. Some of you might remember Yahoo! messenger.
- http/2 (2015): Focused on performance with multiplexing header compression and server push. Most of the early social media like Facebook, Twitter etc.
- http/3 (2020): Built on QUIC a transport protocol that replaces TCP to solve latency and reliability issues. Early adopters are linkedin, amazon, google to name a few.
There were a few shortcomings in http/2.
- Head-of-line blocking: A single lost packet could delay all other streams in http/2.
- Slow handshake times: Establishing a TCP connection required multiple round trips which slowed down initial page loads.
- Connection migration issues: If a user switched networks (like moving from WiFi to mobile data) the connection would break requiring a full re-establishment.
- Uses QUIC instead of TCP: QUIC runs over UDP making connections faster and more reliable.
- Faster handshakes: Only one round trip is needed to establish a secure connection.
- Better multiplexing: Streams are independent so packet loss on one does not impact others.
- Seamless connection migration: QUIC allows connections to survive network changes like switching from WiFi to mobile data. It works better in unreliable network conditions.
- Encryption by default: QUIC encrypts all traffic by default using TLS 1.3.
Here are some resources for further reading: