facebook / proxygen

A collection of C++ HTTP libraries including an easy to use HTTP server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upstream HTTP2

SteveSelva opened this issue · comments

Does Proxygen supports multiplexing over HTTP2 in Upstream Connections by default?

Since multiplexing is protocol requirement for HTTP2, is it implemented by default for Upstream Connections?

But I found that for each request from downstream, new connection is being created for upstream. If not implemented by default, how to implement it?

commented

Yes it supports using H2. When creating the upstream connection, just make sure you are using TLS and the "h2" ALPN is set. If the server supports H2 it will be negotiated and used. You can follow how the curl sample does it here: https://github.com/facebook/proxygen/blob/main/proxygen/httpclient/samples/curl/CurlClientMain.cpp.

See also #449 regarding how to pool session objects.