I have read some of the archived emails about HA, loadbalancing, failover etc and I am still a bit confused about how I could set up some sort of resiliency with freeswitch. My situation is much less complex than the scenarios people were talking about and I hoping the solution is similarly much less complex. I have two machines. Both will run freeswitch and also an IVR application with local databases. I will take care of the database, application and configuration synchronization between the two machines. Ideally the calls would be load balanced between the machines and if any application falls down then the calls should go to the other machine. Same if I take a machine down for whatever reason. If a machine goes down I am willing to "lose" those people who were making a call at the time. I do have a flag in the application which will stop answering the calls while processing the existing calls for a graceful shutdown and hopefully the load balancer would shuttle the calls to the other machine while this is happening. At this stage everything is done via SIP. My questions are... Do I have to have a sip proxy? If the answer is yes it seems like I have to set up two sip proxies so I don't have another single point of failure. Can I load the sip proxies on the same machine? Do I need two more machines? If I take load balancing out of the picture would it be possible to do a simple linux HA or a windows built in ip failover solution? Would a simple IP failover work over UDP or would I have to use IAX and tcp/ip ? Is it better to go the virtualization route? Sorry if these are dumb questions. I am just trying to get my head wrapped around this. I don't need five nines (although that would be awesome), I just want a reasonable degree of assurance that my app can keep taking calls in case something weird happens.
The easiest place to do this is at the point you send the calls to FreeSWITCH. How are the calls coming in? Mike On Dec 2, 2009, at 7:49 PM, Tim Uckun wrote:
I have read some of the archived emails about HA, loadbalancing, failover etc and I am still a bit confused about how I could set up some sort of resiliency with freeswitch.
My situation is much less complex than the scenarios people were talking about and I hoping the solution is similarly much less complex.
I have two machines. Both will run freeswitch and also an IVR application with local databases. I will take care of the database, application and configuration synchronization between the two machines. Ideally the calls would be load balanced between the machines and if any application falls down then the calls should go to the other machine. Same if I take a machine down for whatever reason.
If a machine goes down I am willing to "lose" those people who were making a call at the time. I do have a flag in the application which will stop answering the calls while processing the existing calls for a graceful shutdown and hopefully the load balancer would shuttle the calls to the other machine while this is happening.
At this stage everything is done via SIP.
My questions are...
Do I have to have a sip proxy? If the answer is yes it seems like I have to set up two sip proxies so I don't have another single point of failure. Can I load the sip proxies on the same machine? Do I need two more machines?
If I take load balancing out of the picture would it be possible to do a simple linux HA or a windows built in ip failover solution? Would a simple IP failover work over UDP or would I have to use IAX and tcp/ip ?
Is it better to go the virtualization route?
Sorry if these are dumb questions. I am just trying to get my head wrapped around this. I don't need five nines (although that would be awesome), I just want a reasonable degree of assurance that my app can keep taking calls in case something weird happens.
On Fri, Dec 4, 2009 at 4:59 AM, Michael Jerris <mike@jerris.com> wrote:
The easiest place to do this is at the point you send the calls to FreeSWITCH. How are the calls coming in?
From an as of now unkown SIP trunk provider (we are still in negotiations with a couple of companies).
so your registering to the provider to get the calls? If so, this gets tricky, the provider likely does not support multiple registrations, even if they did they probably send the call to both registered endpoints. With this big unknown its not very easy to suggest a good solution. If I were looking to set this up without needing proxies I would want to use srv records and naptr records and a provider that would balance using these including failiover. Mike On Dec 3, 2009, at 3:40 PM, Tim Uckun wrote:
On Fri, Dec 4, 2009 at 4:59 AM, Michael Jerris <mike@jerris.com> wrote:
The easiest place to do this is at the point you send the calls to FreeSWITCH. How are the calls coming in?
From an as of now unkown SIP trunk provider (we are still in negotiations with a couple of companies).
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Mike, Lets suppose we have: - 2 machines configured for high availability (LAN HA) in a master/slave configuration with a floating public address on the master. ( http://www.ultramonkey.org/3/topologies/ha-overview.html) - freeswitch installed on every machine configured to use mysql in the core via odbc - both freeswitch have identical dialplan and directory configuration - mysql installed on every machine (with replication between the DBs) - SIP Trunks towards the upper provider (without registration but i should work with registration) - SIP Phones/Terminals registering to the active freeswitch When a terminal registers to the active freeswitch, the registration is propagated to the inactive one via DB replication. Now, lets suppose we have a switchover ... of course we will lose the ongoing calls but new calls (from SIP Phones) should be able to establish. The same applies to incoming calls from the upper provider. Im just talking about HA here not loadbalancing and performance scaling... what do you think about that? On Fri, Dec 4, 2009 at 1:56 AM, Michael Jerris <mike@jerris.com> wrote:
so your registering to the provider to get the calls? If so, this gets tricky, the provider likely does not support multiple registrations, even if they did they probably send the call to both registered endpoints. With this big unknown its not very easy to suggest a good solution. If I were looking to set this up without needing proxies I would want to use srv records and naptr records and a provider that would balance using these including failiover.
Mike
On Dec 3, 2009, at 3:40 PM, Tim Uckun wrote:
On Fri, Dec 4, 2009 at 4:59 AM, Michael Jerris <mike@jerris.com> wrote:
The easiest place to do this is at the point you send the calls to FreeSWITCH. How are the calls coming in?
From an as of now unkown SIP trunk provider (we are still in negotiations with a couple of companies).
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Have you checked out Redfone? While I haven't attempted to implement it yet, my Redfone foneBridge2 claims to be able to handle load balancing and failover between two Asterisk/Freeswitch servers. -AF -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Tim Uckun Sent: Wednesday, December 02, 2009 5:50 PM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] HA questions. I have read some of the archived emails about HA, loadbalancing, failover etc and I am still a bit confused about how I could set up some sort of resiliency with freeswitch. My situation is much less complex than the scenarios people were talking about and I hoping the solution is similarly much less complex. I have two machines. Both will run freeswitch and also an IVR application with local databases. I will take care of the database, application and configuration synchronization between the two machines. Ideally the calls would be load balanced between the machines and if any application falls down then the calls should go to the other machine. Same if I take a machine down for whatever reason. If a machine goes down I am willing to "lose" those people who were making a call at the time. I do have a flag in the application which will stop answering the calls while processing the existing calls for a graceful shutdown and hopefully the load balancer would shuttle the calls to the other machine while this is happening. At this stage everything is done via SIP. My questions are... Do I have to have a sip proxy? If the answer is yes it seems like I have to set up two sip proxies so I don't have another single point of failure. Can I load the sip proxies on the same machine? Do I need two more machines? If I take load balancing out of the picture would it be possible to do a simple linux HA or a windows built in ip failover solution? Would a simple IP failover work over UDP or would I have to use IAX and tcp/ip ? Is it better to go the virtualization route? Sorry if these are dumb questions. I am just trying to get my head wrapped around this. I don't need five nines (although that would be awesome), I just want a reasonable degree of assurance that my app can keep taking calls in case something weird happens. _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Fri, Dec 4, 2009 at 5:56 AM, Adam Ford <lists@redbonez.net> wrote:
Have you checked out Redfone? While I haven't attempted to implement it yet, my Redfone foneBridge2 claims to be able to handle load balancing and failover between two Asterisk/Freeswitch servers.
That would be my choice for incoming E1 lines. Right now I am looking for a SIP solution.
Since you seem to have most of the heavy lifting squared away with FS (e.g. database replication) and before reinventing the wheel, I would recommend that you speak to a few VoIP providers and see if they will do this for you as part of your service. Those that are using carrier class platforms (so-called active clustering) should be able to do this without too much effort on their part. If you reach any dead ends, please feel free to contact me off list. The one thing that you may want to keep in mind is that unless FS is not involved in the media flow (or has a chance to redirect the call to another FS), existing calls will be dropped. FS has no mechanism for exchanging/mirroring stateful signaling and media information between other FS nodes to specifically facilitate failover. As I believe the developers have indicated in this list, to do so would require significant investments in time and resources to implement it in the sofia sip stack at the moment. -metik Tim Uckun wrote:
I have read some of the archived emails about HA, loadbalancing, failover etc and I am still a bit confused about how I could set up some sort of resiliency with freeswitch.
My situation is much less complex than the scenarios people were talking about and I hoping the solution is similarly much less complex.
I have two machines. Both will run freeswitch and also an IVR application with local databases. I will take care of the database, application and configuration synchronization between the two machines. Ideally the calls would be load balanced between the machines and if any application falls down then the calls should go to the other machine. Same if I take a machine down for whatever reason.
If a machine goes down I am willing to "lose" those people who were making a call at the time. I do have a flag in the application which will stop answering the calls while processing the existing calls for a graceful shutdown and hopefully the load balancer would shuttle the calls to the other machine while this is happening.
At this stage everything is done via SIP.
My questions are...
Do I have to have a sip proxy? If the answer is yes it seems like I have to set up two sip proxies so I don't have another single point of failure. Can I load the sip proxies on the same machine? Do I need two more machines?
If I take load balancing out of the picture would it be possible to do a simple linux HA or a windows built in ip failover solution? Would a simple IP failover work over UDP or would I have to use IAX and tcp/ip ?
Is it better to go the virtualization route?
Sorry if these are dumb questions. I am just trying to get my head wrapped around this. I don't need five nines (although that would be awesome), I just want a reasonable degree of assurance that my app can keep taking calls in case something weird happens.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (5)
-
Adam Ford
-
Metik
-
Michael Jerris
-
Tihomir Culjaga
-
Tim Uckun