[OpenSIPS-Users] Load balancer - releasing resources
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Dec 24 09:26:15 CET 2009
Hello Peter,
LB does not work for the redirect scenario, but only for a call through
(proxy) scenario. Because OpenSIPS considers as load the number of
ongoing calls, and into a redirect scenario, opensips cannot know how
many ongoing call are.
Also, use all the time the stateful functions when using LB. LB
mechanism is tied to dialogs which are tied to transactions. So replace
the sl_send_reply() with t_reply() .
Regards,
Bogdan
Peter P GMX wrote:
> Hello,
>
> we use OpenSIPS as a load balancer in front of a Freeswitch cluster. We
> use the load_balancer module for load_balancing and redirecting requests
> to this 2 machines.
> For each machine we have defined a number of resources (e.g. 3000 for
> each server). After a while these resources are full, so the load
> balancer module does not balance any more.
> Here some extract from the routing:
> if ($si=~"^xxx.xx.xxx.xxx") {
> # redirect external gateways to the right server
> load_balance("1","external");
> $ru = "sip:" + $rU + "@" + $dd + ":" + $dp;
> sl_send_reply("302", "redirect");
> exit;
> } else {
> } else {
> # load balance all registered phones through OpenSIPS
> load_balance("1","internal");
> ....
> }
>
> if (!t_relay()) {
> sl_reply_error();
> }
>
> My main question is: Does OpenSIPS automatically release the load
> balancer resources after a while? Or does it release when a SIP session
> is ended?
> We have now set the resources to 300000000 but we do not know for how
> long they may last.
>
> Best regards
> Peter
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Bogdan-Andrei Iancu
www.voice-system.ro
More information about the Users
mailing list