[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread David Villasmil via sr-users
Yeah, problem comes when calls draining last longer than the drain time (which in aws is max 3600). Then I need to figure out something different. Like iptables or something like that. Unless Daniel has a better way from within Kamailio? Regards, David Villasmil email: david.villasmil.w...@gmail

[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread Sebastian Damm via sr-users
Yes, that's a successful connection first. But it helps to get rid of the existing connections as well, since there is no new SYN for re-registrations. And yes, I want the clients to reconnect. If have disabled the node in the loadbalancer before enabling maintenance mode, There won't be any new

[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread Daniel-Constantin Mierla via sr-users
Hello, there is a statistic value giving the active tcp connections (which include the tls connections) and then you can get the value via $stat(...) variable:   - https://www.kamailio.org/wikidocs/cookbooks/5.7.x/pseudovariables/#statname-statistics I don't recall right now if the name of th

[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread Sebastian Damm via sr-users
We usually already have a high enough number of max tcp connections. However, there are certain scenarios when restarting some of our servers the loadbalancer sends all the clients previously connected to these servers to the remaining ones, leading to really full and really empty nodes. And som

[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread David Villasmil via sr-users
Thanks for the tips. But wouldn’t that be considered by the load balancer a successful connection since there was an ACK to the SYN in order to send the 503 data? Or does that work for you because you’re relying on the client to retry and the load balancer sending to a different server? Regards,

[SR-Users] Re: Get the amount of open TCP connection from routing logic

2024-02-06 Thread David Villasmil via sr-users
Why not just increase the max tcp connections? Also, once you hit it, Kamailio will reset the syn and the load balancer should try on a different server. I am look for something like what you’re looking for but reset the sub on-demand so I can put the server in maintenance mode. Regards, David V

[SR-Users] Get the amount of open TCP connection from routing logic

2024-02-06 Thread Sebastian Damm via sr-users
Hello, My plan is to reject new inbound requests if there is already a certain number of open connections on one Kamailio server. I could answer with a 503 and directly close the connection forcing the client to reconnect and the loadbalancer to send traffic to a different node on the next conn