failover and loadbalance for relayed requests

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

failover and loadbalance for relayed requests

Leandro
Hi dhcp users:
I have a few years working with isc dhcp, I would like to move my dhcp
service scheme to a virtualized enviroment to provide HA and load
balance on a relayed scheme.
I would like to ask for some documentation to read and also ask for the
dhcp isc failover capabilities and recommendations.
I imagine to setup two servers for instance with lease database sync and
two ips configured on the relays ... is that possible ? how does iscp
manage the leases db sync?
also could think in a proxy or a load balancer but need to investigate
and read a little bit more about it ....
Ok  ... that`s all ... any idea would be wellcome,
Regards,
Leandro.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Fwd: failover and loadbalance for relayed requests

Leandro

Hi dhcp users: I have a few years working with isc dhcp, I would like to
move my dhcp service scheme to a virtualized enviroment to provide HA
and load balance on a relayed scheme. I would like to ask for some
documentation to read and also ask for the dhcp isc failover
capabilities and recommendations. I imagine to setup two servers for
instance with lease database sync and two ips configured on the relays
... is that possible ? how does iscp manage the leases db sync? also
could think in a proxy or a load balancer but need to investigate and
read a little bit more about it .... Ok ... that`s all ... any idea
would be wellcome,
  Regards, Leandro.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Simon Hobson
In reply to this post by Leandro
Leandro <[hidden email]> wrote:

> I would like to ask for some documentation to read

start with "man dhcpd.conf"

> and also ask for the dhcp isc failover capabilities and recommendations.

You can have 2 (and no more than 2) servers in a failover pair per pool. You essentially clone the config file from the primary to the secondary - and add the relevant failover peer declarations.

> I imagine to setup two servers for instance with lease database sync and two ips configured on the relays ... is that possible ?

Yes, that's how it works

> how does iscp manage the leases db sync?

It's internal. When one server issues a lease, it notifies the other which updates it's local lease file.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Leandro
Thanks Simon !!!

On 03/06/15 12:18, Simon Hobson wrote:

> Leandro <[hidden email]> wrote:
>
>> I would like to ask for some documentation to read
> start with "man dhcpd.conf"
>
>> and also ask for the dhcp isc failover capabilities and recommendations.
> You can have 2 (and no more than 2) servers in a failover pair per pool. You essentially clone the config file from the primary to the secondary - and add the relevant failover peer declarations.
>
>> I imagine to setup two servers for instance with lease database sync and two ips configured on the relays ... is that possible ?
> Yes, that's how it works
>
>> how does iscp manage the leases db sync?
> It's internal. When one server issues a lease, it notifies the other which updates it's local lease file.
>
> _______________________________________________
> dhcp-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Sean McMurray
In reply to this post by Leandro
On 06/03/2015 07:48 AM, Leandro wrote:
> Hi dhcp users:
> I have a few years working with isc dhcp, I would like to move my dhcp
> service scheme to a virtualized enviroment to provide HA and load
> balance on a relayed scheme.
> I would like to ask for some documentation to read and also ask for
> the dhcp isc failover capabilities and recommendations.
> I imagine to setup two servers for instance with lease database sync
> and two ips configured on the relays ... is that possible ? how does
> iscp manage the leases db sync?
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.
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. But
solutions like that are outside of the box.

For built-in failover functionality in ISC dhcpd, you configure two
servers to know about each other. You define which pools they share and
what the split is. For example, you could have the primary serve 2/3 of
the pool, and have the secondary serve 1/3. 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.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Steven Carr
On 3 June 2015 at 16:45, Sean McMurray <[hidden email]> wrote:
> You define which pools they share and what the
> split is. For example, you could have the primary serve 2/3 of the pool, and
> have the secondary serve 1/3.

That must be the most misunderstood part of DHCP failover.

The split *does not* determine the share of the pool. The pool is
*always* balanced 50/50. The split value determines which peer will
respond to the client based on the hashed value of the client
identifier (MAC address).

Steve
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Gregory Sloop
In reply to this post by Leandro
Re: failover and loadbalance for relayed requests Just a note - it's not really "fail-over" but more load-balancing with the ability to handle the loss of one of the peers. [At least when *I* think if fail-over, I think of a server in stand-by, which isn't doing anything. Then when the primary active server fails, the "fail-over" comes up and fully takes over for the primary. And that's not the "fail-over" that ISC DHCPd does.]

I'm not knocking it at all - just that it's got some interesting nuance that can bite you.
Some of these potential pitfalls in peer/fail-over/load-balancing have been, at least partially, mitigated in versions 4.2.0+ [I think] and newer.

A search of the archives and release notes will help you find some of these.
[See: auto-partner-down, and the "rewind" feature also added in 4.2.0+ versions.]

Read the docs carefully - it's quite a bit more complex than you might think at first glance. Not terribly hard or difficult, but it may not function exactly as you'd imagined it to do.
[Corner cases always bite you when you lease(t) {pun intended} expect.]

HTH

-Greg

L> Thanks Simon !!!

L> On 03/06/15 12:18, Simon Hobson wrote:
>> Leandro <
[hidden email]> wrote:

>>> I would like to ask for some documentation to read
>> start with "man dhcpd.conf"

>>> and also ask for the dhcp isc failover capabilities and recommendations.
>> You can have 2 (and no more than 2) servers in a failover pair per pool. You essentially clone the config file from the primary to the secondary - and add the relevant failover peer declarations.

>>> I imagine to setup two servers for instance with lease database sync and two ips configured on the relays ... is that possible ?
>> Yes, that's how it works

>>> how does iscp manage the leases db sync?
>> It's internal. When one server issues a lease, it notifies the other which updates it's local lease file.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: failover and loadbalance for relayed requests

Simon Hobson
In reply to this post by Sean McMurray
Sean McMurray <[hidden email]> 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.



_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: failover and loadbalance for relayed requests

Cuttler, Brian (HEALTH)
In reply to this post by Steven Carr
I had wondered about that, seemed to me that was the mechanism to determine which server replied what percentage of the time, since allocation of IP addresses is not going to do the job, you have to decide to answer based on the question, not on the pool size.

I did not understand that after reading most of the FAQ yesterday, I did not follow up with the referenced FAQ having to do with the pool split, which is not the correct term for this.

Thanks - about to implement this at my site and this discussion was very timely for me.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steven Carr
Sent: Wednesday, June 03, 2015 11:53 AM
To: Users of ISC DHCP
Subject: Re: failover and loadbalance for relayed requests

On 3 June 2015 at 16:45, Sean McMurray <[hidden email]> wrote:
> You define which pools they share and what the split is. For example,
> you could have the primary serve 2/3 of the pool, and have the
> secondary serve 1/3.

That must be the most misunderstood part of DHCP failover.

The split *does not* determine the share of the pool. The pool is
*always* balanced 50/50. The split value determines which peer will respond to the client based on the hashed value of the client identifier (MAC address).

Steve
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users