cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Massive HTTP/2 parallel requests

From: Lucas Pardue <Lucas.Pardue_at_bbc.co.uk>
Date: Wed, 2 Mar 2016 11:42:59 +0000

Hello,

What version of libcurl are you using? There were some issues with libcurl's multiplexing reported in January that were fixed, see https://curl.haxx.se/mail/lib-2016-01/0031.html.

Note that the maximum number of concurrent streams is directional (https://http2.github.io/http2-spec/#SETTINGS_MAX_CONCURRENT_STREAMS). It sounds like perhaps the server is restricting you to only 64 concurrent client-initiated streams per connection. Can you tell us the value the server is using? If you don't have access to server config a packet trace of the SETTINGS frame (or dump in client code) will let us know.

Regards
Lucas

> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Molina
> Sent: 02 March 2016 09:47
> To: curl-library_at_cool.haxx.se
> Subject: Massive HTTP/2 parallel requests
>
> Hello,
>
> I’m working in a project that downloads a decent amount of files
> simultaneously, with an average size of 512KB. We’ve been using CURL with
> HTTP/1.1 requests so far, and I’ve been modifying the code to adapt it to
> HTTP/2.0. However, when trying to simultaneously download 1024 files for
> testing I realised only 64 where actually active, while the rest were idle. I was
> using only one multiplexed connection with CURLOPT_PIPEWAIT enabled.
>
> Secondly, just in order to try I set the following flags:
>
> curl_multi_setopt(multi_handle, CURLMOPT_MAX_TOTAL_CONNECTIONS ,
> 1024);
> curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS,
> 1024);
>
> Which apparently enabled multiple 64-file-wide HTTP/2.0 connections,
> where each one received the corresponding “101, switching protocols”
> answer.
> Is this limit something desirable or convenient for the performance of
> HTTP/2.0? Would you have an advice for this use case?
>
> Thanks a lot in advance, and best regards.
> José Molina

-----------------------------
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-----------------------------

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-02