11.4 Load Sharing Between Mirrored Servers
The Microsoft DNS Server has a feature called round
robin (named after the equivalent feature in the BIND name
server): the server rotates address records for the same domain name
between responses. For example, if the domain name
foo.bar.baz has three address records for IP
addresses 192.1.1.1, 192.1.1.2, and 192.1.1.3, the round-robin
feature causes the name server to give them out first in the
order:
192.1.1.1 192.1.1.2 192.1.1.3
then in the order:
192.1.1.2 192.1.1.3 192.1.1.1
and then in the order:
192.1.1.3 192.1.1.1 192.1.1.2
before starting over again with the first order and repeating the
rotation ad infinitum.This functionality is enormously useful if you have a number of
equivalent network resources, such as mirrored FTP servers, web
servers, or terminal servers, and you'd like to
spread the load among them. You establish one domain name that refers
to the group of resources and configure clients to access that domain
name, and the name server inverse-multiplexes the accesses between
the IP addresses you list.It's a good idea to reduce the
records' TTLs, too. This ensures that, if the
addresses are cached on an intermediate name server that
doesn't support round robin,
they'll time out of the cache quickly. If the
intermediate name server looks up the name again, your authoritative
name server can round-robin the addresses again.Note that this is really load sharing, not load balancing: the name
server gives out the addresses in a completely deterministic way,
without regard to the actual load or capacity of the servers
servicing the requests. In our example, the server at address
192.1.1.3 could be a 486 running Linux and the other two servers
could be quad-processor Itanium2s, and the Linux box would still get
a third of the load.