[kea-dev] Another hook suggestion: configurable periodic timers

Tomek Mrugalski tomasz at isc.org
Mon Dec 1 16:21:24 UTC 2014

On 19.11.2014 17:50, Chaigneau, Nicolas wrote:
> I think of the following:
> Allow to define in configuration a list of timers, each of which would be composed of a period and identifier.
> For instance, with a timer of 5 min and one of 1H:
> 	"periodic-timers": [
> 		{
> 			"id": "timer-monitor"
> 			"period": 300,
> 		},
> 		{
> 			"id": "timer-1H"
> 			"period": 3600,
> 		}
> 	]
> Kea would trigger a new hook "periodic timer" each time the period of one of the timers is reached.
> The hook library would receive both "id" and "period" arguments, which would allow to decide what to do (or do nothing).
There are two aspects of this proposal. First, Kea does not support
timers per se. At least not yet. This is something we will definitely
implement in the near future. One specific reason for timers support is
periodic lease clean up and expiration. We'll need a (configurable)
timer that will trigger 2 things: expired lease processing and lease
file rewrite. (or maybe there will be two separate timers for that, it
isn't designed yet). There's no question about it and it will be
implemented. I plan to file a ticket for that in the next couple days,
along with other tickets required for lease expiration/clean up.

The second aspect is whether to add custom (user definable) timers and a
hook they would trigger. I see some value in such capability, but its
implementation would take some time and honestly speaking there are more
urgent missing features. So feel free to submit a ticket for this, but
I'm afraid it is unlikely anyone would implement this anytime soon.


More information about the kea-dev mailing list