Results 1 to 8 of 8
  1. #1

    Failover and mirroring a website.

    Hello All,

    I have two linux servers situated at different places, running Red Hat Enterprise Linux ES release 3.

    I have a particular domain on server one for which I want to achieve a few things,

    1) Data mirroring: Mirror the html, flash files and images for this particular domain on the second server,the mirroring should be realtime.

    2) Fail over: If master server goes down or is unaccessible from any location user should be able to retrieve pages from the second server. Then the second server should automatically display webpages in case the master goes down or is not accessible.

    I would be very thankful if one could guide me.

    Thanks in Advance.

  2. #2
    Hopefully these answers will help you out:
    1) To mirror the data simply setup an RSYNC CRON job to run at preset time frames. RSYNC is nice in that it only transfers the files that have changed since the last transfer. Search on Google for an RSYNC tutorial.

    2) The only way to accomplish a "true" fallover is with a clustered environment, which requires some sort of load balancer to be placed in from of your two webservers. The "poor mans version" of this can be accomplished by setting your TTL values in your DNS zone files to something low like, 10-30 minutes. Once your primary server goes down, you will need to propogate the new zone files that point all of your A names to your backup server. For most ISPs that follow low TTL values like that, the site would only be down for 20-30 minutes until their cache's purged the old records. However, not all ISPs will follow low TTL values, and if that is the case some visitors may not be able to view the site for quite some time.

    So in short, true fallover is timeconsuming, and usually quite expensive to do correctly. DNS fallover is usually good enough for what most companies "need", and it works quite well. On the other hand if you have your servers in an excellent datacenter and on good hardware, usually the need for a secondary backup/fallover system is null.

    Hope this helps,

    The Maag Group - Intelligent IT Solutions
    Colocation Dedicated Servers Server Administration 877.622.4477

  3. #3
    Thanks Peter,

    About failovers,

    The two servers I want to accomplish failover are not clustered,
    I am trying to find more information DNS fallover, could you please elaborate this a bit more? If am not wrong, you are talking about using CNAME records in Bind?

    Thanks in Advance.

  4. #4
    A better way to do the "poor mans version" is to have both servers as NS servers for that doman (and only those two, since if they're both down it really doesnt matter). Set the TTL very low, 1-5 minutes or so and have each server point DNS queries to itself.

    This way, the first server to respond to DNS is the one a person gets connected to. So ideally you'd have servers in different geographic locations.

    For instance: -
    w > > > -
    w > >

    The only problem doing it this way is some ISPs cache DNS data and ignore the TTL. They enforce their own forced updates, so if one machine were to go down someone on their network wouldn't be able to get to the site until the ISP's DNS data was refreshed.

  5. #5
    This method would work in a perfect world where database data was non-important, and the site was completely static. The second you start adding dynamic content everything goes down the tube. How are you going to sync database data between sites?

    If am not wrong, you are talking about using CNAME records in Bind?
    You could use CNAME's I suppose, but I would use A records. We use tinydns by the same author of QMail Dan B. and have been extremely happy with the reliability of the software package.

    In Bind you would create an A record that points to the specific IP address of your webserver. Set the TTL value low to something like 5-30 minutes. When/If that primary webserver goes down, change the A record in Bind to point to your alternate webserver....Once that TTL expires in client's caches you will have a semi-good fallover solution.

    Hope this helps,

    The Maag Group - Intelligent IT Solutions
    Colocation Dedicated Servers Server Administration 877.622.4477

  6. #6
    Join Date
    Nov 2001
    Parsippany, NJ
    You could find a host with multiple datacenters and colocate one server in datacenter A, and one in datacenter B and use IP anycast so they both can respond to incoming queries. This will only work if both datacenters are part of the same network.

  7. #7
    Join Date
    Mar 2004

    How about this service?


    They include failover with premium service and allow 5 second TTL (time to live). For a small fee they will do DNS for up to 50 domains.

    I don't know how the service is but I always recommend people do DNS with someone other than thier service provider.

    Anyone comment on these guys?

    They charge a fraction of what others charge like

    auto fail over dot com

    Sorry but I'm new so I can't publish URL's.

  8. #8
    Join Date
    Mar 2004

    Failover with two shared accounts

    You could actually use the above service and two shared accounts at two diverse ISP's and have a pretty solid solution to downtime for peanuts.

    When one shared account goes down, all traffic bumps over to the other shared account.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts