The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Which way to go Failover/Load Balancing/Redundant Server

Discussion in 'Data Protection' started by melsworld, Jun 5, 2008.

  1. melsworld

    melsworld Active Member

    Joined:
    Apr 7, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hi everyone,

    Until last weekend I had not thought about redundant server, backup server, failover, clustering - but guess who had one old box on floor 1 at The Planet and a new box that I was migrating to on the 2nd floor - correct me!

    For those of you that missed the fun they had a major power outage which affected 9000 servers and for some people their boxes were down for up to 3+ days

    So I have come to the conclusion that I need some sort of redundancy/failover provision

    Whilst I do not have an unlimited budget I am prepared to go for a 2 server setup if needs be as this has impacted on my profits sufficiently to warrant it

    Presently my box is used only for my sites some of which are just static page sites and others making use of databases as well. On my new box I am using cPanel

    I am not selling hosting services at the present time and have no immediate plans to do so

    I could do with some good suggestions on the way forward

    From what I have gleaned from the various forums, if I understand it correctly load balancing would provide me with a failover situation so if server A went down server B would kick in?

    Also if I have read correctly the servers could be in different data centers?

    Looking at the WHM if I set up clustering am I correct in thinking that the master would upadate pages on the slave? likewise would it update database entries? - could the WHM clustering be used for boxes in different DC's

    If you think that load balancing is overkill and have any other suggestions please feel free to comment

    At the end of the day I need to have some set up whereby if one DC's power supply gets fried as in the case of ThePlanet I can be up and running on another box in the shortest possible time

    All comments suggestions would be very much appreciated

    Thanks Mel
     
  2. srobinson

    srobinson Well-Known Member

    Joined:
    Feb 6, 2008
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    Check out this post here with someone requesting similar information
    http://forums.cpanel.net/showthread.php?t=81985

    tolra also stated the following on that post
     
  3. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Hello Mel,

    I agree with srobinson. A couple of months ago I have setup redundant accounts through dnsmadeeasy. All you need is a second box in a remote datacenter (or even a shared hosting account allowing ssh, mysql and rsync) and dnsmade easy will monitor your primary box and switch the A records when necessary (i.e. within 5 minutes when primary server fails). DNS and failover solutions are very easy to setup (watch the videos!)

    The frequency at which you want to synchronize your data between the 2 servers really depends on your needs. If you are hosting very dynamic web sites (e.g. discussion forums, on-line stores), you will need to look into much more sophisticated solutions. However, for small to medium static websites, I found that a daily backup was sufficient (remember, this is for emergency only). I have been using this mirroring script that is working perfectly:

    http://wiki.site5.com/Mirror_site

    This option appeared to be much more easier than clustering and has practically no impact on server load (only take seconds for db and file sync). The downside is that you need to configure that for each account.

    Cheers,

    Seb
     
    #3 sebby, Jun 11, 2008
    Last edited: Jun 11, 2008
  4. melsworld

    melsworld Active Member

    Joined:
    Apr 7, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Took a look at dnsmadeeasy - am I correct in thinking that if you have for example 10 sites on you master box that you need to set up A records for each domain rather than just the primary domain so effectively you would be adding let's say a minimum of 2 A records per domain i.e mydomain.com & mail.mydomain.com

    Thanks Mel
     
    #4 melsworld, Jun 12, 2008
    Last edited: Jun 12, 2008
  5. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    That is correct. You need to setup all the domains that you wish to monitor and each of them must contain all relevant records (A, MX, etc...). However, if your setup is the same for all your accounts (i.e. same set of records/IPs), I suggest that you have a look at their templating system in the the advanced functions. You can then easily apply the template to all the relevant domains (used that for parked domains). NOTE: As a misconfiguration can have serious consequences on the availability of your web sites, you must be familiar with DNS before proceeding - or test your config with a secondary web site).
     
    #5 sebby, Jun 12, 2008
    Last edited: Jun 12, 2008
  6. melsworld

    melsworld Active Member

    Joined:
    Apr 7, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Good idea testing the config with a secondary website

    Thanks for your input Seb & SRobinson

    Mel:)
     
  7. srobinson

    srobinson Well-Known Member

    Joined:
    Feb 6, 2008
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    No problems! If you wanted another server just to test that one website on then give me a bell as it be intrested to see the outcome of this!
     
  8. Serra

    Serra Well-Known Member

    Joined:
    Oct 27, 2005
    Messages:
    213
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Florida
    I've been messing with this a bit myself before I found this thread. One thing I've found that works really well is to setup a MASTER-MASTER replication with mySQL. That way, no matter which site is active, both sites have the same data. Then just replicate the two sites files using rsync and it's fairly easy to get working.

    There are several good posts on master-master replication, but here is the one I used:

    http://www.howtoforge.com/mysql_master_master_replication
     
Loading...

Share This Page