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

Posted by marc22 on Server Fault See other posts from Server Fault or by marc22
Published on 2010-10-09T07:57:29Z Indexed on 2012/06/27 3:18 UTC
Read the original article Hit count: 383

Filed under:
|

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.

© Server Fault or respective owner

Related posts about dns

Related posts about clustering