Welcome! Log In Create A New Profile

Advanced

TCP connection limit on dynamic backend

R, Rajkumar (Raj)
March 26, 2019 05:14AM
Hi,

Using nginx in TCP/Stream mode and would like to limit the number of active connection to my backend server whereas the backend is resolved dynamically based on the SNI header ($ssl_preread_server_name). But this does not allow any connections to the backend with below config. I see examples of limiting backend connections if the backend server block is pre configured.

Could you please confirm if this achievable or supported currently with Stream mode?

Below is the related config part.

map $ssl_preread_server_name $backend_svr {
~^(\w+).test.com $1-tcp.default.svc.cluster.local;
}

limit_conn_zone $ssl_preread_server_name zone=perserver:10m;

server {
listen 443 reuseport so_keepalive=30s:30s:3 backlog=64999;
proxy_pass $backend_svr:443;
limit_conn perserver 255;
ssl_preread on;
}



thanks,
raj
+918067153382

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

TCP connection limit on dynamic backend

R, Rajkumar (Raj) March 26, 2019 05:14AM

Re: TCP connection limit on dynamic backend

Roman Arutyunyan March 26, 2019 07:30AM

RE: TCP connection limit on dynamic backend

R, Rajkumar (Raj) March 26, 2019 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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