Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mind Map Analysis of http Protocol version of http

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

The http version of the httpd protocol

1. Structural overview

In the chapter of http protocol, I will introduce the above six parts successively. This article first introduces the protocol version of http.

2.http protocol version

The history of the http agreement is not long, from version 0.9 of 1991 to now (2017) only 20 years, calculated that http is still in the youth, is a good time for great development. Although it is less than 27 years, it has changed the way human beings understand the world. Here, we must bow to the great sages.

The function of version 0. 9 is very simple, just a get function, get translates to get, in this case, to obtain resources. The new version 1.0 was released five years later because of its poor functionality and naturally not a lot of applications.

Version 1.0 is rich in content and adds a lot of features. Get gets the resource, post sends the resource, and head saves the first information of the resource. Multi-purpose Internet Mail extension (MIME,Multipurpose Internet Mail Extensions) is an Internet standard, which extends the e-mail standard and supports multimedia data transmission, which greatly enriches the http protocol.

The format of the http1.0 version request looks like this:

GET / HTTP/1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10 / 10 / 5) Accept: * / *

The response format looks like this:

HTTP/1.0 200 OK Content-Type: text/plain Content-Length: 137582 Expires: Thu, 05 Dec 1997 16:00:00 GMT Last-Modified: Wed, 5 August 1996 15:55:28 GMT Server: Apache 0.84 Hello World

Although http1.0 is already very powerful, it still has its disadvantages. Only one request can be sent per TCP connection, so the new TCP connection is expensive and inefficient, so the keep-alive mechanism, namely persistent connection, was introduced later. Simple understanding, that is, uninterrupted connection for a long time.

Http1.0 is very powerful, so it increases people's dependence on http protocol. With a wide range of applications and applause from the audience, the developers of http protocol seem to beat the chicken blood and release http1.1 only half a year later. It is often said that slow workers can do fine work. I'm sorry, it doesn't apply here. Here, it's more like the concentrated product of time is the essence. Http1.1 is so powerful that it is still in use today.

The advantages of http1.1 protocol are as follows:

1. Enhanced the cache function, the current popular version 2. Persistent connection (persistent connection) 3. The pipeline mechanism (pipelining) is introduced, and the client can send multiple requests at the same time. 4. The Content-Length field is introduced, and the content length of the tag is 5. The introduction of block transmission coding greatly increases the transmission speed by 6. 5%. Richer method:GET, POST, HEAD,PUT, DELETE,TRACE, OPTIONS,HOST

The data of http1.1 communicates sequentially, and there is a problem of queue head jam. There are two common ways to dredge a blockage:

1. Reduce the number of requests by 2. Open more persistent connections at the same time

Reduce the number of requests is easy to understand, no longer verbose. Opening more persistent connections is essentially reducing the number of requests and avoiding frequent disconnections that are unnecessary. As a result of these two ways, a lot of solving techniques have emerged, including the following:

1. Merge scripts and stylesheets, 2. Embed the picture into CSS code 3. Domain name fragmentation (domain sharding)

Based on efficiency and security considerations, http2 made a strong debut. The predecessor of http2 is google's SPDY protocol, the SPDY protocol is very powerful, and the http R & D engineer, who feels Alexander, is in a hurry to develop in addition to the http2 protocol. Http2 has the following characteristics:

1. Predecessor: SPDY Protocol (google) 2. Thorough binary protocol, header information and data body are all binary, improve efficiency, increase security 3. Multiplexing (MultiPlexing), that is, connection sharing, avoiding head-of-line congestion 4. Data stream transmission, increase transmission efficiency 5. The header information is compressed, which reduces the transmission size by 6. Server push

At this point, the introduction of the http protocol version is over. Thank you for watching. The next section describes a complete http request process.

Reference:

Http://www.ruanyifeng.com/blog/2016/08/http.html

Http://www.alloyteam.com/2016/07/httphttp2-0spdyhttps-reading-this-is-enough/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report