On lease expiration

Shawn Routhier sar at isc.org
Tue Jul 22 17:26:45 UTC 2014


On Jul 22, 2014, at 7:37 AM, Stephen Morris wrote:

> <snip>

> 
>> d) That's b) + an optimization. When assigning or updating a lease,
>> we can keep the timestamp to the shortest expiration event and
>> dynamically set X to that value. So if there are no leases, we'll
>> select() for MAX_UINT. If there are 1000s of leases, we'll select()
>> until the shortest (or oldest) one expires. This is how expiration
>> is implemented in Dibbler. Seems to be working fine.
> 
> Does Dibbler keep the leases ordered by expiration time? For Kea, we'd
> have to add an index on that field to the lease database to allow
> selection of the lease with the next expiration time.

Just for completeness I believe that in ISC DHCP we do this two different ways
in v4 we use an ordered list
in v6 we use a heap

In v6 we also have some other features that cause the expiration
and cleanup of a lease to be delayed.




More information about the kea-dev mailing list