Welcome! Log In Create A New Profile

Advanced

keepalive not work with grpc

August 05, 2018 11:21PM
Hi, everyone! I have a problem that keepalive does not work with grpc.
My conf looks like this:

worker_processes 1;

events {
worker_connections 102400;
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
keepalive_requests 1000;

upstream grpc_backend {
server localhost:2080;
keepalive 2;
}
...
server {
listen 1090 http2;
server_name localhost;
...

location / {
grpc_pass grpc://grpc_backend;
}
}
}
I have a C++ gprc client and C++ grpc server that works well together without nginx.
It seems like that nginx does not support the keepalive with grpc_pass at all. There are still so many connections built from nginx to grpc server that all my ports are consumed. I remember that nginx does support that, so how could it work? Where is my mistake?
Subject Author Posted

keepalive not work with grpc

hunterqin August 05, 2018 11:21PM

Re: keepalive not work with grpc

hunterqin August 10, 2018 03:10AM

Re: keepalive not work with grpc

Maxim Dounin August 10, 2018 06:20AM

Re: keepalive not work with grpc

hunterqin August 17, 2018 03:36AM

Re: keepalive not work with grpc

Maxim Dounin August 21, 2018 10:00PM

Re: keepalive not work with grpc

hunterqin August 22, 2018 12:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready