homepage Welcome to WebmasterWorld Guest from 54.227.12.219
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Best backup solution with two servers?
Backup server synchronises sites from production server
vincevincevince




msg:3482660
 12:11 pm on Oct 20, 2007 (gmt 0)

Current setup is:
  • Production server (rented dedicated) runs PLESK on FC6 and holds sites
  • Backup server (rented dedicated in same DC) runs PLESK on FC6 and synchronises sites from Production server daily (identical setup other than IPs)

    Daily synchronisation is fine. Both servers have different sets of IP addresses. The production server also runs the DNS server for all the sites which are on that same server.

    My question: If something bad happens to the production server, how can I quickly transfer service to the backup server?

    I'd rather not rent an additional server to handle the DNS; and if I use a third-party DNS service - I'd need a way in which adding or modifying a domain in PLESK would automatically update / reconfigure it.

  •  

    jtara




    msg:3482795
     4:28 pm on Oct 20, 2007 (gmt 0)

    if I use a third-party DNS service - I'd need a way in which adding or modifying a domain in PLESK would automatically update / reconfigure it.

    Do you create new domains often enough that that is a big problem?

    Frankly, I find control panels such as Plesk constraining. They want to do too much for me, and have too much control over configuration files, leaving me no way to do things the way I want. I almost think I spend more time trying to work around them than they save me.

    Right now, you have no easy way to fail-over. Your primary server goes down, you have no DNS. You'd have to go to the registrar and point to a different DNS server. 24-48 hours later you'd be back in business.

    You're also in technical violation of the requirement that you maintain at least two DNS servers.

    Many third-party DNS providers have a monitoring service that will automatically switch the IP address of a host to a backup server if your web server doesn't respond. They can also provide simple load-balancing.

    Unfortunately, the one that I use provides only a minimal API. You can use their API to change an IP address. (e.g. "dynamic DNS"). There may be other third-party DNS providers that have a more extensive API that would allow you to create new domains and hosts, and that you might be able to tie-in to Plesk.

    vincevincevince




    msg:3482812
     5:00 pm on Oct 20, 2007 (gmt 0)

    Do you create new domains often enough that that is a big problem?

    It's not so much me but others who have access to adding domains to the server; PLESK is very fast and very easy for them to use.

    Incidentally, DNS server as the same as the web server is the default PLESK setup. Is there an established / suggested method of retaining the full functionality of PLESK without having to have the DNS on the same server?

    aspdaddy




    msg:3482823
     5:21 pm on Oct 20, 2007 (gmt 0)

    The way I look at it is how can I reduce the risk as much as possible (good hosts)and have a contingency plan to put in place ASAP (monitoring, email alerts, other ways of doing business). It can take from a few minutes to absolute max 48hrs, usually the lower end in my experience (2-6 hours) and sometimes with no or very little cost if its done ASAP.

    jtara




    msg:3482941
     9:07 pm on Oct 20, 2007 (gmt 0)

    Incidentally, DNS server as the same as the web server is the default PLESK setup.

    Yes, I know - but that doesn't mean that it isn't still a horrible idea.

    It gives resellers the illusion that they are providing a complete service. What they are providing is a bare-minimum of service that you could get by on, if reliability isn't terribly important.

    I think that most control panel users aren't really resellers, though, and are simply using the control panel to make it easier to run a number of their own domains.

    Since you are your own customer, it's best to drop the illusions and see things as they are.

    Is there an established / suggested method of retaining the full functionality of PLESK without having to have the DNS on the same server?

    Yes, kind of - I'm sorry, I missed this the first time around. Unfortunately, this still won't allow you to create new top-level domains on the third-party service. It will let you add hosts and subdomains to existing domains, and to change IP addresses. You will still need to set-up each domain at the third-party DNS provider's web site, but you can probably do this with only a couple of clicks using a template. I suppose you could automate this using some screen-scraping package, or seek-out a DNS provider with a full API. You'll still have to figure out how to hook-in to Plesk.

    You can use your internal DNS server as a "hidden" master, and then use a third-party DNS service. Have the third-party DNS service do zone-transfers from your DNS server. Do not put a pointer to your DNS server at the registrar. Be careful with permissions - make sure that you configure your DNS server to allow zone transfers only from the IP address of the third-party DNS server.

    Note that your SOA record will have to name one of your third-party DNS provider's servers as master. You may need to do some research on how to do that. Or, the third-party service may be able to override the SOA record and ignore the one that comes with the zone transfer.

    ("zone transfer" = essentially, "download")

    Almost all third-party DNS services support zone transfers from your server. It's unlikely that you will find this feature with a registrar's DNS service, however.

    If you are using a failover service, you will want to keep DNS on a short leash. That is, set a small TTL value for the site(s) that you may want to failover. This can be as short as 5 minutes with some services. Of course, that will increase the volume of DNS requests and possibly incur additional charges. So, pick a compromise that you can live with.

    You certainly don't have to wait 1-2 days, or even hours for a DNS change to propagate. YOU are in control. It's just that most webmasters choose NOT to take control, and accept the "conventional wisdom" that it takes 1-2 days for a DNS change to take effect.

    Pointers at the registrar to the DNS servers are a different matter. You normally don't have control over their TTL, which *is*, typically, 1-2 days. This is but one of many reasons why you don't want to be changing pointers to your DNS servers as any part of a failover plan other than as a very last resort.

    Your DNS infrastructure should be the most reliable component of your system. That's why I favor third-party providers that do this and nothing else.

    vincevincevince




    msg:3483118
     1:59 am on Oct 21, 2007 (gmt 0)

    Thanks jtara, I think that will help a lot.

    My 'new' idea is to rent two separate VPS services and use them as DNS servers.

    I then want to use scp via cron to copy the /etc/named.conf files from both servers (production and backup) onto the VPS servers (name them nameda.conf and namedb.conf).

    I'll then set up a cron job on both VPS servers which checks if the primary IP of the production server responds on port 80; in the case of failure I'll use namedb.conf on that vps and restart named, otherwise I'll use nameda.conf.

    (Or something along those lines).

    I'm thinking low TTL on the VPS servers (~5 mins) with the cron doing the check every 5 mins at the least. The cron copying named.conf files from the servers can be every half-hour I think.

    Does that sound like a workable solution?

    Global Options:
     top home search open messages active posts  
     

    Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
    rss feed

    All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
    Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
    WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
    © Webmaster World 1996-2014 all rights reserved