找回密码
 立即注册
相关推荐换一批
  1. GY 5056-2005 中波广播发射台工艺设备安装规范
  2. YD/T 926.3-2001 大楼通信综合布线系统 第3部分:综合布线用连接硬件技术要求
  3. YD/T 926.3-2009 大楼通信综合布线系统 第3部分:连接硬件和接插软线技术要求
  4. YD/T 847-1996 视听电信业务中 64~1920kbit/s 信道的帧结构
  5. GB 44017-2024燃气用具连接用金属包覆软管
  6. GB 44023-2024燃气用具连接内用橡胶复合软管
  7. YY/T 0725-2009/ISO 11 144: 1995 牙科设备给排管路的连接
  8. GB/T 7939.1-2024液压管接头 试验方法
  9. TB/T 3246.1-2010 机车车辆及其零部件设计准则螺栓连接第1部分:螺栓连接的分类
  10. TB/T 3246.2-2010 机车车辆及其零部件设计准则螺栓连接第2部分:设计机械制造应用
  11. TB/T 3246.3-2010 机车车辆及其零部件设计准则螺栓连接第3部分:设计一电气应用
  12. TB/T 3246.4-2010 机车车辆及其零部件设计准则螺栓连接第4部分:螺栓连接的安全
  13. TB/T 3205.3-2016 扼流变压器钢轨引接线、中点连接线、中点连接板第3部分:中点连接板
  14. YY/T 1440-2016 与医用气体系统一起使用的高压挠性连接
  15. YY/T 0842-2011 医用内窥镜内窥镜附件镜鞘
  16. YY/T 0961-2014 脊柱植入物脊柱内固定系统组件及连接装置的静态及疲劳性能评价方法
  17. TB/T 3246.6-2010 机车车辆及其零部件设计准则螺栓连接第6部分:连接尺寸
  18. YY/T 0281-1995 口腔科手术器械连接牢固度试验方法
  19. TB/T 2352-93 BZ型扼流变压器中点连接板
  20. TB/T 2075.19-2020 电气化铁路接触网零部件第19部分:接地线夹及连接装置
  21. YD/T 3052-2016 虚拟专用局域网服务(VPLS)中基于边界网关协议(BGP)的多归连接技术要
  22. HG/T 3207-2009 代替 HG/T 3207-1981 石墨管凸缘连接
  23. GB/T 38644-2020 信息安全技术 可信计算 可信连接测试方法
  24. GB/T 9125.2-2020 钢制管法兰连接用紧固件第2部分:Class系列
connection连接theHTTP | 软件工程 2022-04-27 330 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