此为历史版本和 IPFS 入口查阅区,回到作品页
weipengban1989
IPFS 指纹 这是什么

作品指纹

Detailed comparison of HTTP 1.1, HTTP 2.0, and HTTP 3.0 transmission protocols

weipengban1989
·
·

Detailed comparison of HTTP 1.1, HTTP 2.0, and HTTP 3.0 transmission protocols

HTTP 1.1, HTTP 2.0, HTTP 3.0 Common HTTP transmission protocols, features, working methods, differences, development significance and comparison.

Through this article, you can learn:

1. What is HTTP protocol?

2. The development and changes of HTTP 1.1/2.0/3.0

3. The main differences between HTTP 1.1/2.0/3.0

4. The significance of HTTP 3.0 evolution and development

I. What is HTTP protocol?

HTTP (Hyper Text Transfer Protocol) is an application layer protocol for transmitting hypertext documents. It is based on TCP protocol and is designed for communication between web browsers and web servers.

Basic features of HTTP protocol:

1. Based on TCP protocol, application layer protocol

2. Transmit some HTML, CSS, JavaScript content

3. Request and response

4. Simple and extensible: simple semantics and customizable content in request header

5. Stateless: requests are isolated from each other

All versions of HTTP transmission protocol so far can be divided into HTTP 0.9, HTTP 1.0, HTTP 1.1, HTTP 2.0, HTTP 3.0, among which HTTP 1.1 is widely used, HTTP 2.0 is being promoted, and HTTP 3.0 is the future version. Today, we mainly introduce these three versions.

II. Development and changes between HTTP 1.1, 2.0, and 3.0

1. Introduction to HTTP 1.1 protocol

1.1. Features of HTTP 1.1 protocol

HTTP stands for Hypertext Transfer Protocol, an application protocol used for communication over the World Wide Web since its launch in 1989. HTTP is a method used by computers and servers on the Internet to request and send information.

HTTP 1.1 is a standardized protocol that eliminates a lot of ambiguity and introduces several improvements.

1.2. How the HTTP 1.1 protocol works

The HTTP transport protocol uses some simple methods to send and receive information between computers. The two most common methods are: (1) get; (2) post. When a client computer communicates with a server, it sends one of these commands to instruct the server what to do next. In response, the server typically returns a resource (such as an HTML web page) to the client computer.

HTTP 1.1 Get Example:

Let's put this into an example HTTP transaction that might occur.

In this example, the client computer uses the GET method to request an HTML document named "index.html" from a host server at the address "www.example.co.uk" using the HTTP/1.1 protocol. In response, the web server returns the "index.html" document to the client computer along with any associated style sheets, images, or other resources.

However, these resources are not all returned in one transaction - the request and response are passed back and forth until all relevant data has been transferred and the client can display the web page on its browser.

POST Example

Here is another example of how to perform a typical HTTP transaction with a POST command:

In this example, the client computer sends data to the specified server using the POST method. The data sent here is "field1=value1&field2=value2". The first line defines the method being used, the file to which the data is to be sent, and the HTTP version. The "host" line defines where the client computer should connect to before sending the specified data.

2. Introduction to HTTP 2.0 Protocol

2.1. HTTP 2.0 Protocol Definition

HTTP 2.0 is the first major revision of the HTTP protocol, which aims to reduce web page loading delays by implementing various optimization techniques. The HTTP 2.0 transport protocol was released by the IETF (Internet Engineering Task Force) in May 2015 and is intended to be a standard communication method compatible with all available web browsers.

2.2. How the HTTP 2.0 protocol works:

While HTTP 1.1 and HTTP 2.0 share semantics to facilitate communication between the two protocols, the methods they use to pass data can differ significantly.

2.3. Features of the HTTP 2.0 protocol:

1. HTTP 2.0 protocol connections are permanent and only require one connection per source.

2. Flow control: a mechanism that prevents the sender from sending large amounts of data to the receiver (server).

3. The server can actively push information.

The main differences between HTTP 2.0 and HTTP 1.x transport protocols are as follows:

(1) HTTP 2.0 encodes request and response messages as binary instead of transmitting the normal plain text messages seen with HTTP 1.1.

(2) HTTP 2.0 is fully multiplexed and concurrent, which means that it can make more requests to a website than the limited requests in HTTP 1.x.

(3) Utilize stream priority for website assets.

(4) Header compression is used to reduce overhead processing.

3. Introduction to HTTP 3.0 protocol

3.1. HTTP 3.0 protocol definition

HTTP 3.0 is a new version of HTTP transport protocol based on QUIC network protocol released in August 2020. As the third version of Hypertext Transfer Protocol (HTTP), HTTP 3.0 protocol was formerly known as HTTP-over-QUIC. QUIC (Quick UDP Internet Connections) was originally developed by Google and is the successor to HTTP 2.0 protocol. Companies such as Google and Facebook are already using QUIC to speed up the network.

3.2. How HTTP 3.0 works:

As a very new protocol, HTTP 3.0 may undergo some changes in the next few years, but its foundation will still be firmly based on the QUIC protocol.

QUIC (Quick UDP Internet Connections) is a new network transport layer protocol that aims to significantly reduce latency and improve efficiency compared to TCP. Essentially, connections are established faster - especially when network conditions are not optimal. Because QUIC reduces the TCP slow start problem, the speed of video streaming may be significantly improved, especially in UHD and above. Additionally, HTTP 3.0 can also provide speed improvements when moving between mobile and WiFi networks for the same reason.

III. How does the HTTP 3.0 protocol differ from the HTTP 1.0 and HTTP 2.0 protocols?

HTTP 3.0 has several significant differences from the traditional methods used in the HTTP 1.0 transport protocol and the 2.0 transport protocol. Let's take a look at some of the key differences.

1. Introduction to UDP vs. TCP network protocols

The most obvious difference between HTTP 3.0 and older versions (which only use TCP) is that HTTP 3.0 is entirely based on QUIC, which utilizes UDP.

2. Header Compression – QPACK vs. HPACK:

HTTP 3.0 uses QPACK, a compressed format for representing HTTP headers used by HTTP over QUIC in the HTTP transport protocol. HTTP 3.0 uses QPACK, a compressed format for representing HTTP headers used by HTTP over QUIC in HTTP.

IV. The Significance of HTTP 3.0 Evolutionary Development

Just like HTTP 2.0, this is an advancement spearheaded by Google. The HTTP 3.0 protocol will again build on these achievements, either intermittent or soon. While the HTTP 2.0 transport protocol does provide us with multiplexing and alleviates head-of-line blocking, it is constrained by TCP.

You can use a single TCP connection to transmit data for multiple streams multiplexed together, but when one of the streams suffers from packet loss, the entire connection (and all its streams) is constrained, that is, until TCP completes its task (retransmitting the lost packets).

Source: www.ebyte.com/

CC BY-NC-ND 4.0 授权