httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <>
Subject Re: mod_watchdog API, was Re: svn commit: r759751 - /httpd/httpd/trunk/modules/cluster/mod_heartbeat.c
Date Sun, 29 Mar 2009 20:25:15 GMT
Paul Querna wrote:
> On Sun, Mar 29, 2009 at 9:17 PM,  <> wrote:
>> Author: mturk
>> Date: Sun Mar 29 19:17:30 2009
>> New Revision: 759751
>> URL:
>> Log:
>> Use child singleton watchdog for running the heartbeat module
>> Modified:
>>    httpd/httpd/trunk/modules/cluster/mod_heartbeat.c
> I'm looking at the API exposed by mod_watchdog.h, and its not quite
> feeling right.
> If we want this to be an API used easily, I think we should just make
> them proper timers (ie, run function X in singleton in 10 seconds),
> and when the timer finishes, it can re-register -- this is far more
> flexiable, and in the long term the API could be taken over by MPMs
> that can better support it.

There are actually two API's
The one I implemented for heartbeat is the simple one,
cause the heartbeat functionality is simple.

The second one is where you create a watchdog instance
with some interval and then it calls the provided
callback. If the callback return != 0 it's not
called any more. If you need a different interval,
change it by API call.

IMO having separate watchdogs is much better then
having one that will call multiple callbacks with
different timeouts because if one job blocks, others
will not execute.

BTW, we had this discussion few months back.


View raw message