As far as I know there are different options for load-balancing.
I even saw some modules for load balancing. But it is a bit tricky
to get this sorted out, because many of the load-balancing options
think of load balancing between several ser servers or in other words
having the ser servers as target of the load balancing process.
While I am looking for a load balancing of requests to a remote sip
server.
I thought that the SRV feature of the DNS system is quite old and long
time established, so I expected that ser would be able to send and
evaluate such a request to the DNS.
There would be nothing special to do for ser, all would be done in the
DNS with the same roud-robin mechanism that works for MX or A records.
You will read between the lines that I am more familiar with DNS than
with ser, so I tend for this kind of solution. But it seems that I have
to look into the source code of ser, to figure out in which way the dns
lookup is done (or maybe I run a tcpdump on the dns port 53, to check
what's happening).
Thanks anyway, Rolf.
On Tue, 22 Apr 2008, Miklos Tirpak wrote:
I think load-balancing was introduced in version 2.0,
so there is no way
to configure it in 0.9.x.
In 2.x, you need to enable it explicitly:
dns_srv_lb=1
Regards,
Miklos
On 04/18/2008 06:06 PM, Rolf Unger wrote:
>Hello list users,
>
>i want to use ser as a load balancing proxy for some PSTN
>gateways that I have in use.
>My idea is to use the rewritehost() core function and DNS SRV
>entries to accomplish this. But it seems that ser is doing a
>A record lookup if I simply replace the host with my domain
>"mynet.interx":
>
> if ( ... ) {
> rewritehost("mynet.interx");
> t_relay();
> }
>
>Ser is running on the same host (89.49.16.54) as the authorative
>nameserver for the mynet.interx domain.
>
>dig shows that the DNS files are configured in the right way for
>load balancing, but I just can't find a way to make ser as a dns client
>work like dig.
>
>If I use "_sip._udp.mynet.interx" it will complain about a bad name.
>Well he is partly right, underscores are not allowed in domain names.
>
>And if I use only the domain in the rewrite command it will contact
>the IP of the nameserver of this domain. Or in other words it will send
>the messages to itself.
>
>Using directly rewritehost("sip1.mynet.interx") doesn't help me,
>because it wouldn't do load balancing.
>
>How can I convince ser (version 0.9.6) to use the correct lookup
>method for the DNS?
>
>Any hints are appreciated ...
>
>Thanks, Rolf.
>
>----------------------------------------------------------------
>
>; <<>> DiG 9.2.4 <<>> -t SRV _sip._udp.mynet.interx
>
>;; QUESTION SECTION:
>;_sip._udp.mynet.interx. IN SRV
>
>;; ANSWER SECTION:
>_sip._udp.mynet.interx. 21600 IN SRV 0 50 5060 sip3.mynet.interx.
>_sip._udp.mynet.interx. 21600 IN SRV 0 50 5060 sip1.mynet.interx.
>
>;; AUTHORITY SECTION:
>mynet.interx. 21600 IN NS mynet.interx.
>
>;; ADDITIONAL SECTION:
>sip1.mynet.interx. 21600 IN A 89.49.16.50
>sip3.mynet.interx. 21600 IN A 89.49.16.51
>mynet.interx. 21600 IN A 89.49.16.54
>
>_______________________________________________
>Serusers mailing list
>Serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
CoolSwitchIP wins Best Product of Show Award in Los Angeles! (Sept 2007)
----------------------------------------------------------
Rolf Unger ._---_;
Systems Engineer /( )\ +49 (0)721 7839312
CTI Labs GmbH '---'
Am Sandfeld 18 eMail: rolf.unger(a)ctilabs.de
D-76149 Karlsruhe
-- GERMANY --
----------------------------------------------------------