Welcome! Log In Create A New Profile

Advanced

number of keepalive connections to an upstream

Sébastien Rebecchi
March 18, 2024 09:44AM
Hello,

What is the good rule of thumbs for setting the number of keepalive
connections to an upstream group?

1. https://www.nginx.com/blog/performance-tuning-tips-tricks/
in this blog, the writer seems to recommend a constant value of 128, no
real explanation why it would fit whatever the number of servers in the
upstream

2. https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
the upstream module doc seems to recommend a rule like 16 times the number
of servers in the upstream, as we have two examples with respectively
keepalive 32 for 2 upstream servers and keepalive 16 for 1 upstream server

3.
https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives
in this blog, the writer recommends a rule of 2 times the number of servers
in the upstream

I used to follow rule of item 3 as it comes with a somewhat good
explanation, but it does not seem to be largely accepted.

What could explain such a divergence between several sources? What would
you recommend please?

Regards,

Sébastien.
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

number of keepalive connections to an upstream

Sébastien Rebecchi March 18, 2024 09:44AM

Re: number of keepalive connections to an upstream

Igor Ippolitov March 20, 2024 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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