cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: http2: basic multiplexing seems to work now

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 May 2015 13:43:06 +0200 (CEST)

On Fri, 8 May 2015, Tatsuhiro Tsujikawa wrote:

>> Cool, I haven't gotten around to that yet. I've tried going over the
>> MAX_CONCURRENCY limit and I'm thinking of ways to handle that nicely...
>
> ​If you are thinking about using multiple connections if number of requests
> are too large (e.g., 200), then it has to be done manually.​

Yes, and that's how I intend to go about it. I've started with extracting the
MAX_CONCURRENT_STREAMS setting and I intend to use that as a threshold for
when to start a new HTTP/2 connection.

> Otherwise, ​nghttp2 enforces server's MAX_CONCURRENT_STREAMS internally. If
> more than MAX_CONCURENT_STREAMS handles are added, and
> "nghttp2_submit_request" called, nghttp2 waits for some streams finish, and
> then issue the remaining ones.

Aha. Well that might come handy too if the user doesn't allow more connections
for example. But then libcurl also has such a waiting queue... =)

> So libcurl could use it to start smaller value (1 is safest way, but could
> be too conservative), and then let nghttp2 update it.

Yeah, sounds right.

> While I was hacking around libcurl stuff, it seems that
> "IsPipeLiningPossible" is called before we set conn->httpversion = 20, so it
> just returns FALSE if we use PUT method.​

Ok. I'll give uploading and your work on that a look soon. Today I got stuck
in some other work: I decided I'd make sure we can enable HTTP/1 pipelining
separately from HTTP/2 multiplexing (since once that is possibly we could
start considering merging it parts of the multiplexing work to master). And
once I did that, I decided to run the test suite just to make sure everything
still works...

It really didn't. So I've been cleaning up a bunch of things, primarily to
make sure we don't leak memory and I'm not quite done with this cleanup yet.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-08