Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【2021-07-13】HTTP1.0、HTTP1.1 和 HTTP2.0 的区别 #7

Open
superDCH opened this issue Jul 13, 2021 · 0 comments
Open

【2021-07-13】HTTP1.0、HTTP1.1 和 HTTP2.0 的区别 #7

superDCH opened this issue Jul 13, 2021 · 0 comments
Labels

Comments

@superDCH
Copy link
Owner

(1)HTTP/1

一次请求-响应,建立一个连接,用完关闭;每一个请求都要建立一个连接;

(2)HTTP1.1

长连接,若干个请求排队串行化单线程处理,后面的请求等待前面请求的返回才能获得执行机会,一旦有某请求超时等,后续请求只能被阻塞,毫无办法,也就是人们常说的队头阻塞

(3)HTTP2

多路复用,多个请求可同时在一个连接上并行执行。某个请求任务耗时严重,不会影响到其它连接的正常执行

参考:https://www.huaweicloud.com/articles/6b6daa26344b862ecf49434451d52e3c.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant