Tuesday, December 27, 2016

domain name system - How use DNS server to create simple HA (High availability) of my website?

Welcome,



How can i use DNS server to create simple HA (High availability) of website ?




For example if my web-server ( for better understanding i use internal IP in real it will be other hosting companies)



192.168.0.120 :80 (is offline)
traffic go to
192.168.0.130 :80






You have right, i use bad word "hight avability" of course i was thinking about failover.




Using few IP in A records is good for simple load-balancing.
But not in case, if i want notice user about failure (for example display page, Oops something is wrong without our server, we working on it) against "can't establish connection".



I was thinking about setting up something like this



2 DNS servers, one installed on www server



Both have low TTL



on my domain, set up 2 ns records

first for DNS with my apache server
second to other dns



If user try connect he will get ip of www server using first dns, if that dns is offline (probably www server is also down) so it will try second NS record, what will point to another dns, that dns will point to "backup" page.



That's what i would like to do.



If You have other idea please share.



Reverse proxy is not option, because IP of server can change, or i can use other country for backup.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...