failover and loadbalance for relayed requests

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Jun 3 15:58:30 UTC 2015


Sean McMurray <sean at mvtel.com> wrote:

> ISC DHCP can only do 2 coupled servers. If you are looking for more redundancy/load balancing than that, you will have to be creative.

You can have more, but only 2 for any pool. So, for example, with three servers you could have 3 pools each served by 2 servers. Eg S1 and S2 server P1, S2 and S3 server P2, and S1 and S3 server P3.

> For instance, if you are just looking for load balancing, you could put your leases file on a clustered filesystem and have multiple servers serve different pools in the same subnet, using the same leasefile.

I believe that will lead to massive problems. The leasefile is write only (append) except during server startup, and while it may appear to work for a short time (accumulating leases from all the servers), there is the cleanup ...
By defalt it's once an hour - the server will write out a completely new lease file from internal tables. Each server will therefore write a lease file that does not include any leases from the other servers. If a server has to restart for any reason, it's russian roulette whether the lease file is one with it's own data or one without ! Starting up a DHCP server with no knowledge of what leases it has previously given out is "not a good thing".


> The two servers communicate back and forth about what leases they have served. When one fails, the other takes over and eventually recovers the other's leases.

But note that this isn't automatic - because there are failure modes which can interrupt inter-server communications without stopping either of them serving clients. It's a manual process to put a server into partner down state - though I gather some people do run automated tasks to do this.





More information about the dhcp-users mailing list