Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

About Load Balancing in 3CX...

Discussion in '3CX Phone System - General' started by inter-rupteur, Feb 17, 2009.

Thread Status:
Not open for further replies.
  1. inter-rupteur

    Joined:
    Feb 9, 2009
    Messages:
    15
    Likes Received:
    0
    Hi everybody,

    nothing about load balancing in 3cx software since 2 years ? I heard in other posts (very old) about Windows Cluster but it's very hard to install with 3cx !!
    Is someone has a good solution about this, please ?

    Thanks a lot
    Inter-Rupteur
     
  2. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    Inter-Roupter,

    Could you please specify your requirements for load balancing?
    What should be balanced?
    Why should it be balanced?

    It is very interesting subject for discussion, really.

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Henk

    Henk Member

    Joined:
    Nov 13, 2007
    Messages:
    250
    Likes Received:
    0
    In the old days, a little bit of load balancing was to install 3CX on a different disk than the OS. This created some improvements.

    With the traffic used by 3cx and its footprint, I do not see any load balancing issues anytime soon, unless you have more than one application running on your server.

    I noticed you tried to split the code from the DB, having a dedicated DB server and an app server, good idea but it will create more network traffic which might be better to keep within the "box".

    H
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. inter-rupteur

    Joined:
    Feb 9, 2009
    Messages:
    15
    Likes Received:
    0
    Hi Sy and Henk,

    thanks you for your answers ! I apologize because it's not Load-Balancing in fact but Failover !!! :mrgreen:

    So, today the configuration of 3Cx is one system in one serveur !

    [​IMG]

    If the server fails, i can not do anything ! For my customers, it's not very good...

    -------------------------------------------------------------

    I want to set up a Failover system with multiple identically 3CX servers to resolve this problem ! But I do not see how if the server fails, the Sip-Phones connect to the second or the third server because for customers, this should be transparent... I don't want customers see that sip-phones reboot and connect to the second server. It's must be transparent... This may show that my VOIP System is not very strong and redundant ! Currently, with the crisis I did not want to lose customers !!
    I thought of the Microsoft NLB (Network Load Balancing and especially Failover option), but it's not easy to implement it and i'm not sure that it will work with 3CX...

    [​IMG]

    -------------------------------------------------------------

    In my mind, i would like to implement this solution (below) because for me (and all), the most important is that customers are not disconnected ! On the picture below, we can see that i put PostgreSQL in other servers (for load balancing ) ! As told Henk, it's not a problem if it creates more network traffic because servers are very speed (1 gb/s per nic) !
    So, this is the best configuration that can be put in place ! If 3CX do that, i think that 3CX VOIP Software will be one of the best software on the market !!! :lol:

    [​IMG]

    Now... How can i do ???
    .
    .
    .
     
  5. Henk

    Henk Member

    Joined:
    Nov 13, 2007
    Messages:
    250
    Likes Received:
    0
    I like it :),

    Ok, first from an architectural point off view I would like to see that fail-over and balancing is controlled by the OS and not by the App. Eg. 3CX.

    Proper fail-over arranges for re-routing of traffic and as such the voice traffic should be seen as data traffic. When a system performs a fail over, it should change the route of the traffic. Having said that, IP address 1 fails and it will automatically switch to box 2 which will assume IP address 1. No interruption, it is called in the industry master and slave configuration (I believe).

    Question... should 3CX be able to do this. YES it can. Should 3CX be able to control this NO it should not. This is an lower OSI level than 3CX should be allowed to control, in my opinion and in the context of this post.

    So how to do it?

    Well 3CX is just an other application on you network, if you have proper fail over you should be ok. If you IP address or DNS changes properly than the phone etc can find the route and it should work ok. Same applies for your DB>

    Does that make sense?

    H.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Nick Galea

    Nick Galea Site Admin

    Joined:
    Jun 6, 2006
    Messages:
    1,971
    Likes Received:
    280
    This is an interesting topic inter-rupteur. Thanks for the comments Henk and Matt.

    We definitely want to come up with an easy to use solution since many customers ask this. Unfortunately in practice its not so easy. Clustering is good but notoriously hard to setup.

    My current line of thinking is that with Hyper V there are easier ways to setup clustering. Or so the microsoft marketing info says. Its an area we will research.

    User settings and so on is an area we can quite easily do. Here is where the postgres dbase starts to pay dividends, since its quite easy to do a postgres data replication service. This could be done hourly for example. That way the standby server has all the data up to date when it has to kick in.

    Anyways food for thought.....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Nick Galea

    Nick Galea Site Admin

    Joined:
    Jun 6, 2006
    Messages:
    1,971
    Likes Received:
    280
    For example

    1. Setup 2 servers - could both be Hyper V virtual machines for example to save on hardware. Install 3CX Phone System on both
    2. Use something like Simple Fail over - http://www.simplefailover.com/ to check if server is up and if not it automatically updates DNS to backup server
    3. Install Slony I for Windows - a postgres replication service http://www.slony.info/. The 1.2 version has a windows installer, 2.0 on the way
    4. Figure out how to make it all work together :)

    Along these lines though it should be possible to create failover
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Henk

    Henk Member

    Joined:
    Nov 13, 2007
    Messages:
    250
    Likes Received:
    0
    Redundancy, point of failure etc should be resolved on the OS level, if you do that 3cx most likely will follow suit.

    Problem is that VoIP is realtime and latency dependent, having said that you do not cache any traffic as such, in the case of a fail over you likely get a call drop. (mind you I might be wrong).

    It is a lot easier to do with transactional data than with a voice call, even video is easier.

    Interesting subject, lets see where this is going :).

    H.;
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. inter-rupteur

    Joined:
    Feb 9, 2009
    Messages:
    15
    Likes Received:
    0
    hi,

    you're right Henk and Matt ! All depend in what situation we take...

    I have tasted yesterday with the phone ip of my cie : i got it and hear the tone. I remove the network cable to simulate a network failure (or server failure) for 5 secondes in first time and plug it again. The phone did not reboot or search the sip server ! As soon as i reconnected the phone, the sound came back instantly ! I restart but for 20 secondes and here, the phone searches for the sip server ! So, what I mean by that, it's with 2 or 3 servers and SMB or NLB, i think there will be no interuption of service !
     
  10. h2009

    h2009 Member

    Joined:
    Mar 15, 2008
    Messages:
    447
    Likes Received:
    0
    I think 3CX would be well ahead of the competition if load balancing came in to play.
    Personally from the SIP phones i've used allow a fail-over IP address to be used, thus two separate machines could be run and two version of 3CX could be active - but In an ideal world the two copys would sync to either other to ensure that they are both upto-date, and to detect fail-overs.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. StefanW

    StefanW Head of Customer Support and Training
    Staff Member 3CX Support

    Joined:
    Jun 2, 2009
    Messages:
    1,222
    Likes Received:
    93
    Hello Guys,

    the shown solution is a common Enterprise Setup for HA or even FT (ESX 4.0)
    If this is needed i would recommend to let the infrastucture handle it.
    The Problems doing it VIA 3CX is massive.
    In SIP is no Autodiscovery so the Clients need to update the IP of the PBX and reconnect.
    Pattons Gateways needed to be reconfigured.

    The Bugged solution would be to buy the VizionCore Starter Pack.
    Its include 2 Core license ESX Server and 1 Server for vReplicator.
    Now Replicate the the PBX VM in IDLE moments like lunch breaks and night times.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. shedster99

    Joined:
    Aug 3, 2009
    Messages:
    29
    Likes Received:
    0

    This was the way I was considering our potential failover system, I've used SF for ages and it's great value for money and does the job a treat.

    My question though is how does the licensing work as i'd have two PBX systems live and ready to rock...would I need two individual licenses ?

    TIA
     
  13. comresource

    comresource Member

    Joined:
    May 22, 2009
    Messages:
    303
    Likes Received:
    0
    The 3CX system in our test lab is on a 2008 R2 hyper-v failover cluster. If one node fails the system is booted up on the failover node. The downside to this of course is that there is a couple minutes downtime while it boots back up. The nice thing is the ability to live-migrate the VM from one node to the other (if you need to bring down a node for maintainance) with zero downtime.

    I know this is not exactly load balancing and requires shared storage that supports MS clustering (getting cheaper tho, QNAP is a good choice for iSCSI) as only 1 node at a time is used but it is a good start for minimal outtage during hardware failure.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. shedster99

    Joined:
    Aug 3, 2009
    Messages:
    29
    Likes Received:
    0
    With Nick's suggestion (which is waht I would go for), would there be 2 licenses have to be purchased as it is two seperate servers or 1 licence as there would only be one system "online" at any given time ?
     
Thread Status:
Not open for further replies.