[OpenSIPS-Users] Load balance based on source IP

Bogdan-Andrei Iancu bogdan at opensips.org
Thu May 29 12:46:22 CEST 2014


You can make this more efficient by using the permission module with the 
"address" table - put your ips in there, put the LN group as context for 
the IP - and you can use the check_source_address() -> this will return 
the context too.

The advantage is that the address table in cached in memory, so you do 
not have any runtime db query.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 29.05.2014 11:30, Schneur Rosenberg wrote:
>
> The way I did it, was to create a table of the ip's and which group it 
> should use, every call does a db query, it may put a strain on the db 
> if there is lots of calls, let me know if you have a better solution
>
> On May 29, 2014 10:28 AM, "Muhammad Naseer Bhatti" <nbhatti at gmail.com 
> <mailto:nbhatti at gmail.com>> wrote:
>
>
>     Hi, I am using load balancer module to load balance traffic to a
>     group of media servers. Can I perform my load balancing based on
>     source IP address without using the dispatcher module? It's like
>     if the request comes from a certain IP address, I want it to be
>     routed to a different group of media servers?
>
>
>     -- 
>     Muhammad Naseer Bhatti
>     Sent with Airmail
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140529/e27b5145/attachment.htm>


More information about the Users mailing list