GithubHelp home page GithubHelp logo

http2 POST delay about curl HOT 8 CLOSED

curl avatar curl commented on April 28, 2024
http2 POST delay

from curl.

Comments (8)

bagder avatar bagder commented on April 28, 2024

Thanks. Does it show with a mere -d "fooo" (instead lf --form) as well ? I've not done a lot of posts over HTTP/2 so it is probably something like that lingering...

from curl.

bagder avatar bagder commented on April 28, 2024

Just pushed commit ef1c3b4 which I believe fixes this.

from curl.

icing avatar icing commented on April 28, 2024

Yes, that fixes it for the "h2" case (TLS). The "h2c" case, where no upgrade is triggered because of request content, it still seems unchanged slow. I see no delay, but the upload takes longer than in the TLS case. Some fallback code when nghttp2 does not kick in perhaps?

from curl.

bagder avatar bagder commented on April 28, 2024

Isn't that just the ordinary Expect: 100-continue delay then? Try with -H Expect: and see if it changes anything!

from curl.

icing avatar icing commented on April 28, 2024

As you can see below, the initial wait is gone in all cases, but the upload itself shows poor performance when --http2 is given. ('w. Expect' means -H Expect:)

Timings with curl from github (this morning):

curl https://test.example.org:12346/upload.py: 100k file upload default...
        0.22 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload via http/2...
        0.22 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload default w. Expect...
        0.22 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload via http/2 w. Expect...
        0.22 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload default...
        0.07 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload via http/2...
        7.24 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload default w. Expect...
        0.07 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload via http/2 w. Expect...
        7.24 real         0.00 user         0.00 sys
        0.19 real         0.00 user         0.00 sys

Timings with curl 7.41.0:

curl https://test.example.org:12346/upload.py: 100k file upload default...
        0.09 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload via http/2...
        4.05 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload default w. Expect...
        0.09 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl https://test.example.org:12346/upload.py: 100k file upload via http/2 w. Expect...
        0.22 real         0.01 user         0.00 sys
        0.03 real         0.01 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload default...
        0.07 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload via http/2...
        8.05 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload default w. Expect...
        0.07 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
curl http://test.example.org:12345/upload.py: 100k file upload via http/2 w. Expect...
        7.24 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys.

from curl.

bagder avatar bagder commented on April 28, 2024

All right. Thanks a bunch for all the details. I guess I need to roll up my sleeves and check it out closer.

from curl.

bagder avatar bagder commented on April 28, 2024

commit abfab17 fixes this problem for me at least.

Thanks again!

from curl.

icing avatar icing commented on April 28, 2024

Yep. Works flawlessly. Thanks!

from curl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.