[Lab] Working with Route 53 Part 4 - Failover Routing Policy

We already created a EC2 server setup and tried few routing policies. We deleted those A records. We will create one with failover policy now. We will also need to create health check within route 53 for this. Use this policy when you want an active/passive setup.

 

Steps:

  1. Copy your ELB dns address and go back to Route 53

  2. Go to Healthchecks and click on Create Health Check.

  3. Give any name, keep what to monitor option as Endpoint, select specify endpoint by domain name,  add the ELB dns in the domain name section.

  4. In Advanced Configuration, select request interval option as Fast and failure threshold as 1. Click Next.

  5. Leave Create Alarm option as no, and click create.

  6. Now create a Health check configuration for the entire domain name (e.g. buddytutor.com) than dns. Everything else remains the same in first page. Click Next.

  7.  Select create alarm as yes. Select New SNS topic. Give a name and email. Click create.

  8. Go inside the hosted zone for our domain. Click on the domain to see current records. NS and SOA records should be already created as default.

  9. Click on create record set.

  10. Leave the name as blank to denote naked domain name.

  11. Select the record type as A – Ipv4 Address

  12. Click yes for Alias (as we are configuring for a naked domain name).

  13. Click inside Alias target and select the ELB that is in the closer region. Remember that we have two ELBs, one in closer region and one in faster region.

  14. Select the routing policy as Failover

  15. Select Failover Record type as primary.

  16. Select options Evaluate Target Health as yes, and associate with health check as yes, and then select the health check created for the ELB.

  17. Similarly create a secondary record. Leave the name as blank. Select the record type as A. Click yes for Alias. Select second ELB. Select the routing policy as Failover. Select Failover Record type as secondary. Leave remaining options as is.

  18. Try running the domain url in the browser. It should go to primary site.

  19. Stop both the EC2 instances in primary site.

  20. Go back to Route 53 and check the status. Primary site health check should fail, but sitewide health check will be passing.

  21. Try running the domain url in the browser. It should go to secondary site.

  22. Now stop the secondary EC2 server as well.

  23. Go back to Route 53 and check the status. Both the status should fail in some time.

  24. Restart primary site EC2 instances and health checks should be working now.

  25. Delete the A records that we just created. You do not have to cleanup everything yet, as we will be doing further labs in continuation. Also start the secondary site EC2 instance before next lab.

Learn Serverless from Serverless Programming Cookbook

Contact

Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About

CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream