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

Huawei fully supports Chinese operators in building China's 5G

This morning, the Ministry of Industry and Inform...

HTML page basic structure and loading process

[[433851]] Hello everyone, I am Pippi. Preface Fo...

What are the applications of machine learning in network management?

As networks move toward automation and intelligen...

Why enterprises should pay close attention to Wi-Fi 7

Industry experts predict that the latest Wi-Fi ve...

Satellite Internet: The war is already raging

[[323965]] On April 20, satellite Internet was cl...

Snapchat QUIC Practice: Small Protocol Solve Big Problems

Friends who are familiar with the Internet should...

Transitioning from IPv4 to IPv6, you can't miss these knowledge points

[[277315]] Understanding the network model The ne...

13 key technical differences between SD-WAN providers

Choosing the right software-defined WAN vendor ca...