HTTP2如何解决行头阻塞(HOL)问题 [英] How does HTTP2 solve Head of Line blocking (HOL) issue

查看:781
本文介绍了HTTP2如何解决行头阻塞(HOL)问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTTP2如何解决行头阻塞(HOL)问题?

How does HTTP2 solve Head of Line blocking (HOL) issue?

此问题在http1.1中非常常见,但我听说HTTP2已解决此问题.有人可以解释一下HTTP2如何解决该问题吗?

This problem is very frequent in http1.1, but I heard HTTP2 has fixed this problem. Could someone explain how exactly HTTP2 fixed the problem?

推荐答案

HTTP行头阻止

HTTP术语中的行首阻塞"通常是指每个浏览器/客户端与服务器的连接数量有限,并且对其中一个连接进行新请求必须先等待这些连接才能完成它可以将其触发.

HTTP Head of line blocking

Head of Line blocking in HTTP terms is often referring to the fact that each browser/client has a limited number of connections to a server and doing a new request over one of those connections has to wait for the ones before to complete before it can fire it off.

行首请求阻止了后续请求.

The head of line requests block the subsequent ones.

HTTP/2通过引入多路复用来解决此问题,这样您就可以通过相同的连接发出新请求,而不必等待先前的请求完成.

HTTP/2 solves this by introducing multiplexing so that you can issue new requests over the same connection without having to wait for the previous ones to complete.

从理论上讲,HTTP/1.1的流水线化也提供了一种围绕HOL的方法,但是它很棘手,并且在实践中很容易出错.直到今天,它仍未在网络上得到广泛启用.

In theory, the pipelining of HTTP/1.1 also offered a way around HOL, but it was tricky and very error-prone to implement in practice. That has made it not get widely enabled on the web even up till today.

HTTP/2仍然遭受另一种HOL的困扰,即在TCP级别上. TCP流中一个丢失的数据包使 all 流一直等待,直到重新发送和接收该包为止.正在使用QUIC协议解决此HOL ...

HTTP/2 does however still suffer from another kind of HOL, namely on the TCP level. One lost packet in the TCP stream makes all streams wait until that package is re-transmitted and received. This HOL is being addressed with the QUIC protocol...

QUIC是一个类似TCP"的协议,通过UDP实现的协议,其中每个流都是独立的,因此丢失的数据包只会暂停丢失的数据包所属的特定流,而其他数据流则可以继续.

QUIC is a "TCP-like" protocol implemented over UDP where each stream is independent so that a lost packet only halts the particular stream to which the lost packet belongs, while the other streams can go on.

HTTP/3是通过QUIC而不是TCP和TLS完成的.

HTTP/3 is being done over QUIC instead of TCP and TLS.

这篇关于HTTP2如何解决行头阻塞(HOL)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆