Welcome! Log In Create A New Profile

Advanced

Nginx Proxy KeepAlive and FastCGI KeepAlive

September 30, 2016 03:34PM
FastCGI :

upstream fastcgi_backend {
server 127.0.0.1:9000;

keepalive 8;
}

server {
...

location /fastcgi/ {
fastcgi_pass fastcgi_backend;
fastcgi_keep_conn on;
...
}
}

Proxy :
upstream http_backend {
server 127.0.0.1:80;

keepalive 16;
}

server {
...

location /http/ {
proxy_pass http://http_backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
...
}
}

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

So when keeping connections alive for back end processes / servers how is the keep alive number worked out should I just double it each time I add a new server into the backend's upstream.

So if I have 100 fastcgi servers in my upstream its just 8x100=800 so my keepalive value should be keepalive 800; and the same for proxy_pass upstream 16x100=1600 keepalive 1600;

Or that would be to much and it should not be calculated like this ?

http://www.networkflare.com/
Subject Author Posted

Nginx Proxy KeepAlive and FastCGI KeepAlive

c0nw0nk September 30, 2016 03:34PM

Re: Nginx Proxy KeepAlive and FastCGI KeepAlive

itpp2012 September 30, 2016 03:51PM

Re: Nginx Proxy KeepAlive and FastCGI KeepAlive

c0nw0nk September 30, 2016 04:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
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