Round Robin DNS

Round robin DNS is a technique in which load balancing is performed by a DNS server instead of a strictly dedicated machine. A DNS record has more than one value IP address.

When a request is made to the DNS server which serves this record, the answer it gives alternates for each request. For instance, if you had a three webserver that you wished to distribute requests between, you could setup your DNS zone as follows:

# vi /var/named/domain.com.db

Append/modfiy www entry:

www   IN   A   1.2.3.4
IN   A   2.3.4.5

IN   A   3.4.5.6
IN   A   4.5.6.7

# /etc/init.d/named restart
When a query is made to the DNS server it will first give the IP of 1.2.3.4 for the www host. The next time a request is made for the IP of www, it will serve 2.3.4.5 and so on.
Advertisements

Wild Card DNS

For the DNS, edit the DNS zone file and add the following:
Code:

* IN A x.x.x.x

(where x.x.x.x is the IP for the hosting account using the wildcard)

Edit your httpd.conf config file for your web server and add a
server alias wildcard for the host you want to have wildcards:
Code:

ServerAlias *.mydomain.com

OpenDNS error

change etc/named.conf from:

options {
directory “/var”;
auth-nxdomain no;
pid-file “/var/run/named/named.pid”;

to this:

options {
directory “/var”;
auth-nxdomain no;
pid-file “/var/run/named/named.pid”;
allow-recursion { 127.0.0.1; };