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.

Cluster cpanel servers? [moved]

Discussion in 'Bind / DNS / Nameserver Issues' started by wadearnold, Apr 21, 2005.

  1. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    Cluster cpanel servers?

    Is it possible to cluster two cpanel servers? For our own site we would like to be able to cluster two machines so that if one goes down we can still send/recieve email from the other. Websites will be up and running, etc. Please advise.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Not without a significant investment in hardware or a great deal of scripting, no. I'd suggest you search the forums as this has been discussed before.
     
  3. mr2jzgte

    mr2jzgte Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Florida
    It can be done... I've been runnign it succesfully for 6 months now with only minor issues..

    regards
    james@austdomains.com.au
     
  4. fusioncroc

    fusioncroc Well-Known Member

    Joined:
    Sep 28, 2004
    Messages:
    261
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    U.K.
    mr2jzgte Care to share how ?

    Not being rude , Just it would help the whole community here :)
     
  5. yourmail

    yourmail Member

    Joined:
    Jan 11, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    yes share with us your expirience this is what i look for too !!!

    also about the previous post for hardware solution/investment ???
    how this can be done to cluster via hardware ???

    I need an absolute cluster solution, exactly as two raid'ed disks are !!!
    (both servers to be exactly identical, in passwords, everything !!!)

    And if one goes down, the other would still work !
     
  6. richy

    richy Well-Known Member

    Joined:
    Jun 30, 2003
    Messages:
    276
    Likes Received:
    1
    Trophy Points:
    16
    I did see a guide for a load balanced solution on this forum a few months ago - you needed, at a minimum, two front end "web heads", a load balancer, and then two back end fileservers for total redudancy (if one of the "web heads" went down, the load balancer would default to the other web head, and if one of the fileserving servers went down, requests would go to the other). Expensive in hardware though...
     
  7. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    It would very hard, first you need to sync the data to the new server and have a script that would know when the main server is not working and change your dns. So a monitoring script that has root access to your dns servers. Unless you run dns on each server then you could just have the second server the same as the other one but block it with a firewall then have the monitoring script edit the firewall if the first server fails. Also you would need the hardware the same when mirroring the entire server to the second one.

    The correct way, or I should say the way FBI, Police, ect.. do it is through a router that has load balancing and fail over built in. This runs about $40,000 on ebay if patient.

    But people will pay allot more for mission crital soltuions so the router might pay for itself.

    A great way is to have the back up server syced daily with the main server and if the server crashes just edit the dns servers and refresh the dns. You will ave about 1-8 hours of prapogation and whatever time it takes for your admin to notice the outage and get to work.

    If you do remote backups, this will take about an extra hour then if the server is already synced and ready to go. All and all either one should not take more then 12 hours to be back in full action. :D

    The other was is to create a custom name server for that domain to the i.p. of the back up server. So if your main two name servers fail it will still run off the back up server and it's local dns. Actually that is not a bad way at all. :cool:
     
  8. TotlKaos

    TotlKaos Registered

    Joined:
    Mar 17, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Jersey
    Clustering

    Well we cluster windows right now. But we use a SAN with an active/passive setup.
    The SAN makes sure the same data is being used on both machines! better than
    scripting a copy process. Problem with SAN solutions is they are VERY expensive!
    Even a small Clarrion from EMC will set you back $20-$30 k for a basic setup.

    This makes one server run with basically a hot spare. If the primary drops the secondary takes over in about 30 seconds.
    Only problem is now your running Virtual IP's. This is done so both boxes Share the IP Addresses.
    I have not looked at Cpanel enough yet to see if it's possible. And I have not setup any kind of clustering with Linux. Would be interesting to see if it's possible.

    Russ
     
  9. mr2jzgte

    mr2jzgte Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Florida
    Yeah i toyed with the idea of proper NAS but couldn't justify the cost. So i built my own..

    2 servers running NFS, Rsync, and HA take over. Rsync syncs the files every 10 mins, nfs shares the files, and HA manages the servers so if the primary goes down then the 2ndary kicks in...

    It's double the hardware i'm running 6 x 200gb drive in a raid 0+1 array but it's still cheaper than an EMC solution (5-6k vs 20k)

    The file storage componant of the system is the simplest part of the cluster...

    It's modifying cpanel which was the hardest bit.. Symlinks, modifying scripts etc..

    There is some manual process's i.e adding ssl hosts etc.

    As long as you have a medium level of exposure to linux I could talk you through setting up the system.

    As for system configs etc passwords etc are sync'd every 3 minutes (tunable) the data on the backend machines are sync'd every 10 mins - ok it's not the ideal solution.. You can probably use coda or afs for this but i had zero luck getting it to work properly so i settled for this.

    The guide that was mentioned was my "basic" run through of what I'm running..

    Regards
    James
     
  10. mr2jzgte

    mr2jzgte Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Florida
    It's actualy pretty easy for the failover stuff and load balancing..

    just look at heartbeat (HA) and linuxvirtual server project for the load balancing and service checking scripts...

    As i've said before the hardest bit was the setup in cpanel and all the scripting there.

    The lvs system lets you do weighted connections or round robin sharing.. I would say it's almost possible to have the servers in 2 different locations..

    in this case 3 machines at each site + round robin dns setup.

    I can explain this further but it's a bit of track feel free to message me privately if you want to discuss that.. It's an untested idea but in theory it should work (thats for the 2 site load balancing)

    The hardware solution its great if you can afford it... But I would assume that not many people in this business could afford $40k just for a router outlay


     
  11. mr2jzgte

    mr2jzgte Well-Known Member

    Joined:
    Jun 18, 2003
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Florida
    Ok at a minimum you can do it in 4 servers.. But this is more load balancing that failover/highavailability.. You still have several points of weakness's

    1 x front end lvs load balancer
    2-100 x cpanel/application servers
    1 - filestorage service


    this just provides a equal load over the application machines..

    the real power needs to be the application servers and the network hardware the other machines can be low-mid end spec'd

    we implemented our system for about a total of 15k AUD (its hard to break down a cost because we owned 2 of the servers already) so in reality and extra 8 k on top of our current investment..
     
Loading...

Share This Page