Amazon Route53

Geolocation System with Active Disaster Recovery

Target

  • You have 3 VPC, 1 in Singapore, 1 in Ireland, 1 in Oregon
  • By default, all connections from North America go to Oregon
  • By default, all connections from Europe go to Ireland
  • By default, all connections from Asia go to Singapore
  • If Oregon site is not reachable, all connections from North America go to Ireland
  • If Oregon + Ireland sites are not reachable, all connections from North America go to Singapore
  • If Ireland site is not reachable, all connections from Europe go to Oregon
  • If Ireland Oregon sites are not reachable, all connections from America go to Singapore
  • If Singapore site is not reachable, all connections from Asia go to Europe
  • If Singapore + Ireland sites are not reachable, all connections from Asia go to America

Here an image of what should happen

aws-route53-geolocation%20%281%29.jpg

EC2 work side

create and Linux EC2 machine for each environment , create a security group with port 80 open to the world

  • one in Oregon
  • one in Ireland
  • one in Singapore

ssh login for each machine and

sudo yum install httpd -y
echo "I'm and SINGAPORE/OREGON/IRELAND machine" > /var/www/html/index.html

sudo nano /etc/httpd/conf/httpd.conf

you need to have at the end of the files these lines
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/html
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

and restart the daemon
sudo service httpd restart

check with a curl that the machines are responding from internet

Route 53

  • create the dns to each machine ireland.mydom.com , oregon.mydom.com , singapore.mydom.com
  • creat the health check for each one in Route53 ==> Health Checks
healthcheck.png
  • create 3 CNAME record geolocated.mydomain.com , one with resolution amerca.mydomain.com , one with europe.mydomain.com , one asia.mydomain.com
geolocated1.png
geolocated2.png
geolocated3.png
  • create 2 CNAME europe.mydomain.com both with failover option , the primary with value ireland.mydomain.com with health check Ireland, the second without health check with value europe2.mydomain.com
europe1.png
europe2.png
  • create 2 CNAME europe2.mydomain.com , both with failover option , the primary with value oregon.mydomain.com and health check oregon , the second with value singapore.mydomain.com without health check.
europe3.png
europe4.png
  • do the latest 2 steps for each region
Salvo diversa indicazione, il contenuto di questa pagina è sotto licenza Creative Commons Attribution-ShareAlike 3.0 License