52ky 发表于 2022-4-28 08:55:25

连接太慢该怎么办:HTTPS的优化.pdf

您可能或多或少地听到有人说“HTTPS 连接很慢”。那么“慢”的原因是什么?
通过前两讲的学习可以看出,HTTPS连接大致可以分为两部分,第一是连接建立时的非对称加密握手,第二是握手后的对称加密消息传输。
由于目前流行的 AES 和 ChaCha20 的良好性能,以及硬件优化,包传输的性能损失可以说非常小,几乎可以忽略不计。因此,“HTTPS 连接慢”通常是指首次建立连接的时间段。
在 TCP 连接建立之后,正式数据传输之前,HTTPS 相比 HTTP 增加了一个 TLS 握手步骤。此步骤最多可能需要两次消息往返,即 2-RTT。除了握手消息的网络时间消耗之外,还会有其他“无形”的消耗,例如:

(You may hear people say "HTTPS connection is slow" more or less. So what is the reason for "slow"?Through the study of the first two lectures, it can be seen that HTTPS connection can be roughly divided into two parts. The first is the asymmetric encryption handshake during connection establishment, and the second is the symmetric encryption message transmission after handshake.Due to the good performance of the popular AES and cha20 and hardware optimization, the performance loss of packet transmission can be said to be very small and almost negligible. Therefore, "HTTPS connection slow" usually refers to the time period when the connection is established for the first time.After the TCP connection is established and before the formal data transmission, HTTPS adds a TLS handshake step compared with HTTP. This step may require up to two message roundtrips, i.e. 2-rtt. In addition to the network time consumption of handshake messages, there are other "invisible" consumption, such as:)




页: [1]
查看完整版本: 连接太慢该怎么办:HTTPS的优化.pdf