trying to use NGINX as reverse proxy, and would like to have constant number of open connections to backend (upstream) open at all times.
Is this possible with nginx (maybe haproxy..?) ??
running on ubuntu if it makes any difference
Something like that can be done easily with haproxy. The end result will be that there are no more than N concurrent connections to a backend server + open connections are shared between requests coming from different clients.
backend app
http-reuse safe
server server1 127.0.0.1:8080 maxconn 32
server server2 127.0.0.2:8080 maxconn 32
The example shows 2 servers, haproxy will not open more than 32 connection to each server, and each connection can be shared between several clients whenever that can be done safely.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With