AWS Route53: DNS Failover Now with Elastic Load Balancer Support

    Hello friends! image

    Most recently, an astlock article on DNS faylover was published. The feature, of course, is cool and convenient, but those who hosted large projects with ELB in AWS did not feel the new at all. If the feylover does not work with ELB, then to me personally this function is absolutely useless.

    But then came the day when it became possible to use the benefits of Route53 with ELB. By setting up recording in Failover mode and connecting it to ELB, we thereby enable the ability to automatically monitor ELB. Switching the recording from Primary to Secondary will happen automatically in the following situations:image
    • ELB failure and unavailability
    • lack of healthy instances under ELB

    Route53 now makes it possible to automatically move in the event of a failure of the entire region.

    In this article I will tell you how I tested the new functionality.

    So, for the tests, I set up 2 ELBs and one instance under each of them. On one I installed Apache, and on the other nginx, to distinguish between them.

    Route54 was configured as follows:

    As you can see, one entry is Primary, the other Secondary.

    In the normal state, the domain shows the Apache page, i.e. our live app.

    The domain will prompt:
    $ host has address

    For the test, we go to the host and extinguish the Apache, thereby simulating the application crash. And we begin to look at what is happening on our web page: After

    about 40 seconds, ELB understands that the instance under it is not healthy:

    And after another 2 minutes we get a feylover page:
    IP address has changed:
    $ host has address

    We return everything by running Apache on the first host. Depending on your ELB helcheck, the host will be healthy after a certain amount of time:

    And after 1 minute 40 seconds, the domain returned to the main ELB.

    IP address has changed back:
    $ host has address


    An automatic domain faylover takes about two minutes , a return back is somewhere the same.

    Now we have in our hands a wonderful function that will undoubtedly help us in building highly accessible distributed systems .

    Only registered users can participate in the survey. Please come in.

    New functionality, impressions

    • 6.3% Already use, now even more convenient 3
    • 23.4% Now we will definitely use 11
    • 51% Interesting to look closer 24
    • 4.2% Not Interesting 2
    • 2.1% Tried, not happy with work 1
    • 12.7% Other (in comments) 6

    Also popular now: