Using DynDNS to Reliably Mirror a Website

    Many system administrators sooner or later have the task of "making a website mirror."

    Practice shows that it is most logical to place the mirroring server in another data center. This will save you from a headache in an accident in the main data center. I think comments are redundant here.

    But how to organize a quick site switching to a mirror in another data center?
    We dismiss the option with BPG right away - it's too expensive, not everyone can afford to buy or rent expensive equipment, and not every DC has an opportunity to negotiate.

    DNS servers come to the rescue with the ability to set a small TTL value (roughly speaking - the lifetime of the zone, after which other dns servers start to request updated data from the NS on which the domain data is located, and not from their cache). This approach increases the load on all DNS servers, but allows you to change records in our zone on the fly. Whether it is good or bad is up to you.

    Of course, you can use your servers by placing them in several data centers. But I preferred to shift the responsibility to a more reliable service - .

    The advantages of this approach:
    - the ability to install TTL from 10 seconds (I recommend setting at least 120)
    - the relatively low cost of DNS hosting (about $ 30 per year)
    - reliability (their website claims “not a single break of failure since 2001”)
    - the ability to change the zone using a self-written http client by sending GET requests (you can imagine what automation opportunities open up)

    - there is no way to steer a DNS server, creating complex configurations
    - there are no slave servers in Russia. If the "foreign Internet" is down, then your server will not be available from Russia.

    In general, that's all.
    I hope someone will benefit from my experience. I will be glad to answer questions and comments.

    The purpose of this article is not to advertise the above service, but to point to one of the simplest and most reliable ways to organize mirroring without a single point of failure. The main message: "use a DNS server with a small TTL to quickly switch IP addresses for a domain." You can use your servers - that’s not the point.

    PS: My first post on Habré. :)

    Also popular now: