HTTP / 1.1流水线和HTTP / 2多路复用有什么区别? [英] What is the difference between HTTP/1.1 pipelining and HTTP/2 multiplexing?

查看:1537
本文介绍了HTTP / 1.1流水线和HTTP / 2多路复用有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否因为它需要按照请求的顺序对客户端做出响应,导致HTTP 1.1中的行头阻塞问题?

Is it because it requires the responses to be made to client in the order of request that causes the head of line blocking problem in HTTP 1.1?

如果每个请求花费相同的时间,那么就不会有行头阻塞和HTTP 1.1流水线操作,并且会执行与HTTP / 2相同的操作复用?

If each request takes exactly an equal amount of time, then there won't be head of line blocking and HTTP 1.1 pipelining and would perform same as that of HTTP/2 multiplexing?

(假设HTTP / 2请求中没有请求优先级,忽略HTTP / 2的其他更改,如标头压缩,二进制等)。

(let's say there is no request priority in HTTP/2 requests and disregard other changes of HTTP/2 such as header compression, binary, etc.)

推荐答案

HTTP / 1.1流水线操作仍然要求按请求的顺序完整地返回请求。

HTTP/1.1 pipelining still requires the requests to be returned in full, in the order requested.

HTTP / 2允许将请求响应拆分为块并以混合的方式返回,从而避免行头阻塞。

HTTP/2 allows the requests responses to be split into chunks and be returned in an intermingled fashion so avoiding head of line blocking.

此外HTTP / 1.1流水线从未真正起飞,浏览器和服务器支持有限(请参阅: https://en.m。 wikipedia.org/wiki/HTTP_pipelining )。

Additionally HTTP/1.1 pipelining never really took off and browser and server support is limited (see: https://en.m.wikipedia.org/wiki/HTTP_pipelining).

但是,从理论上讲,它们是相似的,因此具有类似的性能优势。 HTTP / 2只是一个更好,更全功能,更受支持的版本 - 以及您注意到的其他好处。

But yes, in theory, they are similar and hence give similar performance benefits. HTTP/2 is just a better, more fully featured, more supported version of this - along with other benefits that you've noted.

这篇关于HTTP / 1.1流水线和HTTP / 2多路复用有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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