[asterisk-users] load balancing
Grey Man
greymanvoip at gmail.com
Thu Feb 28 22:42:56 CST 2008
On Fri, Feb 29, 2008 at 4:03 AM, Ron <ron at silverbackasp.com> wrote:
> Hi Greyman,
>
> Should it look like this now? Can i use 2 SIP Proxies just to make sure
> i have a backup? will that cause any problem again with regards to
> calling extension to extension? Extensions will register on the asterisk
> still? How about outbound calls to other SIP provider or a telcobridge,
> SIP proxy will handle that also? Basically asterisk will ask SIP proxy
> of everything? Will RTP stream still go thru asterisk?
>
> Also, i plan on setting these up as a Virtual PBX for multiple offices,
> which means company A can only use Trunks for A, B is for Trunk B etc
> etc. Does outbound to trunks have any issues? or problem is just
> basically calling extension to extension?
>
>
> [other voip provider] [telcobridge] -- [pstn]
> | |
> --------------------------------------------------------------------
> [ SIP Proxy ]
> --------------------------------------------------------------------
>
> | | | |
> [ asterisk 1 ] -- [ asterisk 2 ] -- [ asterisk 3 ] -- [ asterisk 4 ]
> | | | |
> --------------------------------------------------------------------
> | mysql cluster |
> --------------------------------------------------------------------
>
>
> Thanks
>
> Regards,
> Ron
Hi Ron,
Yep it starts to get tricky :).
There will be slight difference depending exactly on what you need to
accomplish. I work for a VoIP Proivder that provides services to users
in internet land so our set up is designed for that. If you've got
VPNs or are on a LAN things will be different.
Two SIP Proxy's are definitely a good idea, you can load balance your
users across them using DNS SRV records, DNS Round Robin, IP Load
Balancer (although then you prob should have two load balancers). If
you're just starting your build network build or only have < 1000
users the extra SIP Proxy should go to the bottom of the list. SIP
Proxy's such as OpenSER are pretty stable and don't do anywhere near
as much work as the media server. It's the fault tolerance on your
Asterisk servers that is the most critical thing. They do a lot more
work and in my experience with them (4+ years) they are a lot more
likely to crash than your SIP Proxy.
With two SIP Proxy's you have an additional problem in that now you
need to set the outboundproxy field in the Asterisk realtime database
to the value of the proxy the user agent came through. Asterisk can't
do that for you (as far as I know) so you could possibly use the SIP
Proxy to do registrations or use a custom SIP Registrar. Both are a
good idea as they take registration load away from Asterisk and this
can be VERY significant as your user base grows. We use a custom SIP
Registrar.
For outbound trunking we go directly from Asterisk to the terminating
gateway no SIP Proxy involved. For inbound trunking we do go through
the SIP Proxy for the same reason you get users to. Incoming calls are
going to be more reliable if they are not tied to a single Asterisk
server (I guess you could use SRV records for your Asterisk servers
for inbound trunking as well but then you're kind of duplicating the
role of the SIP proxy).
The RTP stream will always be between the users and Asterisk the SIP
Proxy is never invovled. If you send an RTP packet to a SIP Proxy and
it will just shake its head in an irritated manner and ignore you.
Regards,
Greyman.
More information about the asterisk-users
mailing list