cURL / Mailing Lists / curl-library / Single Mail

curl-library

reusing connection on http2

From: Inca R <incarose_at_gmail.com>
Date: Sat, 15 Aug 2015 11:34:15 -0700

Hi;
I'm testing the new http2 implementation in libcurl.

My question is related to how the multi interface re uses existing http2
connections for multiplexing new requests.

in my application I send requests to:

host1.domain
host2.domain
....
host10.domain

All host<n>.domain resolves to the same IP address.

What I notice in my tests is that all requests to the same host reuse the
same connection or http2 stream, but curl ( or nghttp2 ) opens differnt
connections, to the same IP, if the host is differnt.
*host is the fqdn dnas name that resolves to the same IP

This behavior is actually not good and I miss all the multiplexing and
header compression benefits from http2.

This is correct ? Am I missing something ( configuration, etc )

How the algorithm works ? How it deceides to open a new connection? It is
based on the URL string or the resolved IP ?

Can someone point me to the source code where this happens ?

Thanks

-- Diego B

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