Do you know the differences between different versions of HTTP protocol?

Do you know the differences between different versions of HTTP protocol?

[[420148]]

Introduction

There are already multiple versions of the HTTP protocol. Generally, the websites we visit use either HTTP1.1 or HTTP2. What is the difference between them? Why don't all websites use the same protocol?

Version

Up to now, IETF has released 5 HTTP protocols, including HTTP0.9, HTTP1.0, HTTP1.1, HTTP2, and HTTP3. Here are the differences between the versions:

HTTP0.9

Released in 1991, it has no headers, is very simple in functionality, and only supports GET.

HTTP1.0

Released in 1996, it has poor plaintext transmission security and a very large header. It has the following enhancements compared to 0.9:

  • Added header (decoupling metadata from data)
  • Added status code to indicate the result of the request.
  • Content-type can transfer other files.
  • The http/1.0 version number is added to the request header.

Disadvantage: A new TCP connection is created each time a resource is requested

HTTP1.1

Released in 1997, it is the most widely used version now. It has the following enhancements compared to 1.0:

  • You can set keepalive to let http reuse tcp connection (requests must be sent serially)
  • Support pipeline transmission, and you can continue to send requests after the request is issued
  • Added the HOST header to let the server know which domain name the user requested
  • Added headers such as type, language, encoding, etc.

Updated in 2014:

  • Added TLS support, i.e. https transmission
  • Supports four models: short connection, reusable TCP long connection, server push model (the server actively pushes data to the client cache), websocket model

Disadvantages: It is still a text protocol, and both the client and the server need to use the CPU to decompress it.

HTTP2

Released in 2015, it mainly improves security and performance. Its enhancements compared to 1.1 include:

  • Header compression (merging identical parts of requests sent simultaneously)
  • Binary frame transmission, more convenient for transmitting only the difference part in the header
  • Stream multiplexing, only one connection is needed for the same service, saving connection
  • Server push, the server can respond multiple times to a client request.
  • Can send requests concurrently in one TCP connection

Disadvantages: Based on TCP transmission, there will be head-of-line blocking problems (packet loss stops window sliding), TCP will retransmit lost packets, TCP handshake delay is long, and the protocol is rigid.

HTTP3

Released in 2018, based on Google's QUIC, the underlying layer uses the udp code tcp protocol.

This solves the head-of-line blocking problem, and there is no need for handshakes. The performance is greatly improved, and TLS encryption is used by default.

<<:  Breaking news: Why has Huawei LampSite won the GlobalData Indoor Small Site Rating for three consecutive years?

>>:  How many people are using invalid 5G? The price has doubled, and the experience has become worse

Recommend

China leads the world in quantum technology patents

[[388060]] Quantum technology has become the comm...

BICS: 5G device connectivity unlocks new IoT use cases

BICS, a global voice operator and mobile data ser...

This article illustrates the principles of Kubernetes network communication

[[275296]] Glossary 1. Network namespace: Linux i...

How to deal with the four major challenges of edge computing

Edge computing use cases are broad and its early ...

Enjoy Ruijie's ultra-fast Wi-Fi in all areas when visiting Guizhou Tianhetan

Guizhou Tianhetan Scenic Area is famous for its t...

“Unlimited” is just a cover. Which data card is the most cost-effective?

In order to use more affordable mobile data, I be...

How many optical modules does a GPU need?

1. Network card model There are mainly two types ...

In the era of the Internet of Things, how will smart hardware affect our lives?

In recent years, the Internet of Things (IoT) has...

5G healthcare development direction and challenges

[[403098]] The development of 5G healthcare has e...

The key to making the Internet of Things really take off: wireless charging

From the average suburban home to the factory ass...