-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
curl: disable HTTP/2 support #20639
curl: disable HTTP/2 support #20639
Conversation
230f30c
to
fd98f94
Compare
Most services like cache.nixos.org and nginx httpd servers are much slower serving files using HTTP/2 with curl/nghttp2. The reason is unknown but it's just annoying.
fd98f94
to
effd6e0
Compare
I thought @edolstra said they're MUCH faster? Maybe we need to include NixOS/nix@90ad02b |
The Nix 1.11 I believe the commit you mentioned is for the 1.12 branch where this script has been rewritten in C++. The commit message just indicates that narinfos are downloaded faster, probably due to request multiplexing, but doesn't say anything about bigger NARs. |
OK. Before we disable HTTP/2 support globally I'd like to understand the underlying problem. |
I can reproduce
|
Trying to bump nghttp2 to see if performance improves. |
@domenkozar Already tried that. Even slower in my tests. :/ |
About the same for me (3 samples). |
Strong 👎 on disabling HTTP/2 because of an issue with one HTTP server (Cloudfront). |
@edolstra it's not just Cloudfront, also apache (see issue description). |
@domenkozar The patch curl/curl@a4d8888 mentioned there fixes curl performance for me. Should we just include that patch? |
This is going to be fixed in next curl version. See curl/curl@a4d8888 and nghttp2/nghttp2#730 (comment) I think it's best to wait on the next release. |
@fpletz sure :) |
@domenkozar Thanks for your help. 🍻 |
Oddly, curl with HTTP/2 works fine from an EC2 instance. But maybe that's also dependent on the window size. |
The window patch does fix the problem on non-EC2. |
See #20639. Patch has to be in nixpkgs because fetchurl depends on curl.
See NixOS#20639. Patch has to be in nixpkgs because fetchurl depends on curl. (cherry picked from commit 9007303) Signed-off-by: Domen Kožar <domen@dev.si>
Motivation for this change
Most services like cache.nixos.org and nginx httpd servers are much slower serving files using HTTP/2 with curl/nghttp2. The reason is unknown but it's just annoying.
If you use
curl --http1.1
the downloads are fast but withcurl --http2
they are slow. nghttp2 ships with a download tool which yields the same performance ascurl --http2
. Using a HTTP/2 capable browser like Chromium you can observe fast download speeds.Benchmarks