I am trying to set-up nginx reverse proxy server with dynamic upstream configuration. The upstream servers are grpc servers, so running over HTTP2.
Since http2 uses multiplexing and grpc supports bi-directional streaming, can nginx be configured in below way :
a) Every upstream server on start-up will add itself to upstream servers by calling nginx /api and creates a http2 connection with nginx.
b) Every grpc client when calls grpc API ( via nginx), nginx does grpc_pass to any of upstream server.
Ask is : For every request in step-b, can nginx, while doing grpc_pass to upstream server, use the same http2 connection established in step-a ? Is such configuration possible in nginx ?
When I tested with keepalive 1; in upstream group, I can see it is creating a new connection once for grpc_pass and using the same ( keepalive = 1), but it is not using the connection created in step-a.