git clone 能否受益于 http2
Can git clone benefit from http2
git 克隆可以从 http2 中受益吗?
由于各种网络错误,我总是更喜欢 ssh 而不是 http(s),而且 ssh 似乎比 http(s) 快一点。所以我的问题是:git,尤其是克隆,能否从 http2 的多路复用功能中受益?
HTTP 上的 smart protocol 使用了几个长 运行 请求; HTTP/2 在这里不会显着受益。
相比之下,dumb protocol 提出了更多独立的请求,并且可以从中受益。然而:
The dumb protocol is fairly rarely used these days. It’s difficult to secure or make private, so most Git hosts (both cloud-based and on-premises) will refuse to use it.
在实践中,如果不设计新的协议来利用 HTTP/2,我希望 SSH 继续提供最好的结果。
这个(http2 支持)在 the mailing list 中没有太多讨论。
only occurrence was about a GSoC 2015 project about git fetch:
Due to http limitations and stateless decision, a lot of data is sent
back and forth during have/want negotiation for smart-http. I wonder
if we could implement the "long polling" scheme in a CGI program. The
program terminates HTTP requests and recreates a full duplex
connection for upload-pack to talk to the client. upload-pack falls
back to the normal mode, used by git:// and ssh://.
So basically Git-over-TCP-over-HTTP? :)
是的。隐藏的议程是,如果它运作良好,我们可能有一天会弃用 smart-http。那一天,如果发生的话,将是在遥远的未来。希望到那时我们可以只使用 http2 而不是 tcp-over-http1。
所以是的,它可能会受益 Git,但尚未积极实施它。
git 克隆可以从 http2 中受益吗?
由于各种网络错误,我总是更喜欢 ssh 而不是 http(s),而且 ssh 似乎比 http(s) 快一点。所以我的问题是:git,尤其是克隆,能否从 http2 的多路复用功能中受益?
HTTP 上的 smart protocol 使用了几个长 运行 请求; HTTP/2 在这里不会显着受益。
相比之下,dumb protocol 提出了更多独立的请求,并且可以从中受益。然而:
The dumb protocol is fairly rarely used these days. It’s difficult to secure or make private, so most Git hosts (both cloud-based and on-premises) will refuse to use it.
在实践中,如果不设计新的协议来利用 HTTP/2,我希望 SSH 继续提供最好的结果。
这个(http2 支持)在 the mailing list 中没有太多讨论。
only occurrence was about a GSoC 2015 project about git fetch:
Due to http limitations and stateless decision, a lot of data is sent back and forth during have/want negotiation for smart-http. I wonder if we could implement the "long polling" scheme in a CGI program. The program terminates HTTP requests and recreates a full duplex connection for upload-pack to talk to the client. upload-pack falls back to the normal mode, used by git:// and ssh://.
So basically Git-over-TCP-over-HTTP? :)
是的。隐藏的议程是,如果它运作良好,我们可能有一天会弃用 smart-http。那一天,如果发生的话,将是在遥远的未来。希望到那时我们可以只使用 http2 而不是 tcp-over-http1。
所以是的,它可能会受益 Git,但尚未积极实施它。