Ruediger Pluem wrote:

On 26.07.2006 18:11, Jean-frederic Clere wrote:
Hi,

I have started to write a "generic" health-checker for mod_proxy. I
would like to change the macro PROXY_WORKER_IS_USABLE() to a routine in
proxy_util.c.

Comments?

From my current point of view we should keep this macro as a simple bit checker.
+1 to your efforts writing a "generic" health-checker to mod_proxy. Do you use
a provider approach to implement it?

Yes. I have attached a draft of the include I plan to use.

That would make it possible to reimplement
Mladen's cping_cpong for AJP as a provider.

I already have a prototype of an external health checker process that uses an AJP cping/cpong and a simple connect for http/https. Basicaly mod_proxy uses the health_worker_method routine to write and read from a slot mem that contains the information of the workers + a health information. A balancer could check the health information before using the worker. The health checker process uses the worker description (thru the health_worker_method) to check if the back-end service is running.

Then we would have a very flexible
way to plugin different health-checks.
Yep

Cheers

Jean-Frederic

Regards

RĂ¼diger



/* To store the configuration of the balancers and workers.
 */
struct proxy_balancer_conf {
    char name[32];
    char sticky[32];
    int sticky_force;
    apr_interval_time_t timeout;
    int max_attempts;
    char max_attempts_set;
    char lbmethod_name[32];
};

struct proxy_worker_conf {
    proxy_worker_stat httpstatus;      /* httpd private */
    char balancer_name[32];
    int             id;            /* scoreboard id */
    apr_interval_time_t retry;     /* retry interval */
    int             lbfactor;      /* initial load balancing factor */
    char            name[32];
    char            scheme[6];     /* scheme to use ajp|http|https */
    char            hostname[32];  /* remote backend address */
    char            route[128];    /* balancing route */
    char            redirect[128]; /* temporary balancing redirection route */
    int             status;        /* temporary worker status */
    apr_port_t      port;
    int             min;           /* Desired minimum number of available connections */
    int             smax;          /* Soft maximum on the total number of connections */
    int             hmax;          /* Hard maximum on the total number of connections */
    apr_interval_time_t ttl;       /* maximum amount of time in seconds a connection
                                    * may be available while exceeding the soft limit */
    apr_interval_time_t timeout;   /* connection timeout */
    char                timeout_set;
    apr_interval_time_t acquire; /* acquire timeout when the maximum number of connections is exceeded */
    char                acquire_set;
    apr_size_t          recv_buffer_size;
    char                recv_buffer_size_set;
    apr_size_t          io_buffer_size;
    char                io_buffer_size_set;
    char                keepalive;
    char                keepalive_set;
    int                 is_address_reusable;
    int                 flush_packets;
    int                 flush_wait;  /* poll wait time in microseconds if flush_auto */
    int                 health;
};

Reply via email to