找回密码
 立即注册
相关推荐换一批
  1. 易语言模块 取宽带连接信息.ec
  2. 易语言模块 模块_HTTP读文件.ec
  3. GB/T 20215—2006 计时仪器手表壳非弹簧表带栓型连接尺寸
  4. JT/T 1178.2-2019 营运货车安全技术条件第2部分:牵引车辆与挂车
  5. DZ 21-1982 硬质合金钎头
  6. GY 5056-2005 中波广播发射台工艺设备安装规范
  7. YD/T 926.3-2001 大楼通信综合布线系统 第3部分:综合布线用连接硬件技术要求
  8. YD/T 926.3-2009 大楼通信综合布线系统 第3部分:连接硬件和接插软线技术要求
  9. YD/T 847-1996 视听电信业务中 64~1920kbit/s 信道的帧结构
  10. GB 44017-2024燃气用具连接用金属包覆软管
  11. GB 44023-2024燃气用具连接内用橡胶复合软管
  12. YY/T 0725-2009/ISO 11 144: 1995 牙科设备给排管路的连接
  13. GB/T 7939.1-2024液压管接头 试验方法
  14. TB/T 3246.1-2010 机车车辆及其零部件设计准则螺栓连接第1部分:螺栓连接的分类
  15. TB/T 3246.2-2010 机车车辆及其零部件设计准则螺栓连接第2部分:设计机械制造应用
  16. TB/T 3246.3-2010 机车车辆及其零部件设计准则螺栓连接第3部分:设计一电气应用
  17. TB/T 3246.4-2010 机车车辆及其零部件设计准则螺栓连接第4部分:螺栓连接的安全
  18. TB/T 3205.3-2016 扼流变压器钢轨引接线、中点连接线、中点连接板第3部分:中点连接板
  19. YY/T 1440-2016 与医用气体系统一起使用的高压挠性连接
  20. YY/T 0842-2011 医用内窥镜内窥镜附件镜鞘
  21. YY/T 0961-2014 脊柱植入物脊柱内固定系统组件及连接装置的静态及疲劳性能评价方法
connection连接theHTTP | 软件工程 2022-04-27 317 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
第十四讲我提到了HTTP的性能,用六个字来概括:“还不错,还不够好”。同时,我也谈到了“线头阻塞”,但由于时间关系,我没有详述。这一次,我们来好好看看HTTP在连接中的表现。
HTTP 连接管理也可以算是一个“老掉牙”的话题。您一定听说过“短连接”和“长连接”等术语。今天就让我们一起来澄清一下。
短接
HTTP协议原本(0.9/1.0)是一个非常简单的协议,通信过程也采用了简单的“请求-响应”方式。
它的底层数据传输是基于TCP/IP的,发送请求前需要与服务器建立连接,收到响应消息后立即关闭连接。
因为客户端和服务端的整个连接过程很短,不与服务端保持长期的连接状态,所以称为“短时连接”。早期的 HTTP 协议也被称为“无连接”协议。
短连接的缺点是相当严重的,因为在 TCP 协议中,建立和关闭连接是非常“昂贵”的操作。与TCP建立连接,必须有“第二次握手”,发送3个数据包需要1个RTT;关闭连接是“四挥手”,4个数据包需要2个RTT。
HTTP的一个简单的“请求-响应”通常只需要4个数据包,如果不计算服务器内部的处理时间,最多也就是2个RTT。这样一来,浪费的时间是“3÷5=60%”,三分之二的时间被浪费了,传输效率低的惊人。

(In Lecture 14, I mentioned the performance of HTTP, which can be summarized in six words: "not bad, not good enough". At the same time, I also talked about "thread blockage", but due to time, I didn't elaborate. This time, let's take a good look at the performance of HTTP in the connection.HTTP connection management can also be regarded as an "old-fashioned" topic. You must have heard the terms "short connection" and "long connection". Let's clarify it today.Short circuitHTTP protocol (0.9 / 1.0) was originally a very simple protocol, and the communication process also adopted a simple "request response" mode.Its underlying data transmission is based on TCP / IP. Before sending a request, it needs to establish a connection with the server and close the connection immediately after receiving the response message.Because the whole connection process between the client and the server is very short and does not maintain a long-term connection with the server, it is called "short-term connection". The early HTTP protocol was also called "connectionless" protocol.The disadvantage of short connection is quite serious, because in TCP protocol, establishing and closing connection is a very "expensive" operation. To establish a connection with TCP, there must be a "second handshake", and one RTT is required to send three packets; Closing the connection is "four waves", and two RTTS are required for four packets.A simple "request response" of HTTP usually requires only 4 packets. If the processing time inside the server is not calculated, the maximum is 2 RTTS. In this way, the wasted time is "3 ÷ 5 = 60%", two-thirds of the time is wasted, and the transmission efficiency is surprisingly low.)

[下载]08551494412.rar
[下载]08551527041.rar
[下载]08551540191.rar
[下载]08551521441.rar
[下载]08551573342.rar
[下载]08551611865.rar




上一篇:《 写给大家看的CSS书(第2版) 》.pdf
下一篇:《JAVASCRIPT完全自学手册》.pdf