What DNS server to use for dynamic load-balancing of website?
Posted
by
Marki555
on Server Fault
See other posts from Server Fault
or by Marki555
Published on 2012-03-19T22:11:25Z
Indexed on
2012/03/19
23:31 UTC
Read the original article
Hit count: 214
I will have 2 servers in different datacenters (different countries) and I want to use DNS load-balancing mainly for High Availability of website hosted on those 2 servers. It is just ad tracking site, which records hit in local database and returns few lines on html code.
I want to return 2 A records each time because of DNS pinning in browsers (if one server fails, browser will try second A record which it has already cached).
Both servers will be acting also as DNS servers for redundancy. Now comes my proposed solution: I will use BIND and have both servers as a master for that zone. On each server there will be running script, which will periodically test availability (http) of both servers and remove IP from DNS in case of failure.
Now the questions :)
1) Is BIND suitable for this solution? I think BIND performance is good and it is easy to manipulate the zone file via script. And as I will modify the zone only in case of failure/maintenance, the modifications (and thus bind reload) won't be often.
2) I plan to use TTL of 5 minutes. The website will have about 1000-3000 req/s but from distinct clients (each IP only 1-3 requests), so I think the DNS load won't be too much. I suppose their ISPs will cache the responses for those 5 mins. Is there any reason to lower the TTL even more?
3) Is my master-master approach good? Or should I make one of the servers master and the other one slave? Right now each server can monitor both itself and the other one. If only webservice fails, both DNS nodes will notice it. If the whole server fails, then the remaining DNS node will notice it and the failed node will not answer DNS queries anyway.
4) Is it a big issue when one NS server does not respond to queries? If yes, I can make a third DNS, so anytime at least 2 of them would accept queries...
5) Should I rewrite the zone file via script, or just use dynamic DNS update (for example via nsupdate
utility)?
© Server Fault or respective owner