DekGenius.com
I l@ve RuBoard Previous Section Next Section

2.8 Setting Up Round Robin Load Distribution

2.8.1 Problem

You want to set up round robin for a domain name.

2.8.2 Solution

Just add multiple A records to the domain name. For example:

www.foo.example.    IN    A    10.0.0.1
www.foo.example.    IN    A    10.0.0.2
www.foo.example.    IN    A    10.0.0.3

In successive answers to queries for www.foo.example's address, the foo.examplename servers will rotate the order in which they return the A records, moving the first A record to the end of the list after each response.

2.8.3 Discussion

All modern name servers give out resource records in round robin order by default. Only very old name servers (before BIND 4.9) don't support round robin.

Remember that round robin isn't load balancing. The name server has no idea how busy the web servers that serve www.foo.example's content are, or even whether they're all responding. If the name server at 10.0.0.1 were to crash, the name server would still give out its address first a third of the time. For true load balancing, you need something more than just DNS.

2.8.4 See Also

Section 3.19 for details on how round robin works and how to disable it.

    I l@ve RuBoard Previous Section Next Section