Posts Tagged ‘ dns balancing

Bind9: balancing by client ip (even/odd)

For some reason i need balancing client’s 50/50 for 2 datacenter’s
But, if client send GET request to datacenter1 (DC1) all following request need redirect to the same DC1. Only if DC1 is down – send to DC2
Simplest way – is share client’s by their ip (odd/even)
So we need two Bind9 services on one server.
First Bind9 will be answered that www.example.org is in DC1, second – in DC2
For example first named.conf:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
};
....

Zone:
Read more