Welcome! Log In Create A New Profile

Advanced

same connection usage in grpc-pass in nginx

July 12, 2021 10:50AM
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.
Subject Author Posted

same connection usage in grpc-pass in nginx

rajatgoyal123 July 12, 2021 10:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 228
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready