<-
Apache > HTTP Server > Documentation > Version 2.4 > Modules

Apache Module mod_proxy_hcheck

Available Languages:  en  |  fr 

Description:Dynamic health check of Balancer members (workers) for mod_proxy
Status:Extension
Module Identifier:proxy_hcheck_module
Source File:mod_proxy_hcheck.c
Compatibility:Available in Apache 2.4.21 and later

Summary

This module provides for dynamic health checking of balancer members (workers). This can be enabled on a worker-by-worker basis. The health check is done independently of the actual reverse proxy requests.

This module requires the service of mod_watchdog.

Parameters

The health check mechanism is enabled via the use of additional BalancerMember parameters, which are configured in the standard way via ProxyPass:

A new BalancerMember status state (flag) is defined via this module: "C". When the worker is taken offline due to failures as determined by the health check module, this flag is set, and can be seen (and modified) via the balancer-manager.

Parameter Default Description
hcmethod None No dynamic health check performed. Choices are:
MethodDescriptionNote
NoneNo dynamic health checking done
TCPCheck that a socket to the backend can be created: e.g. "are you up"
OPTIONSSend a HTTP OPTIONS request to the backend via HTTP/1.0*
HEADSend a HTTP HEAD request to the backend via HTTP/1.0*
GETSend a HTTP GET request to the backend via HTTP/1.0*
OPTIONS11Send a HTTP OPTIONS request to the backend via HTTP/1.1*
HEAD11Send a HTTP HEAD request to the backend via HTTP/1.1*
GET11Send a HTTP GET request to the backend via HTTP/1.1*
*: Unless hcexpr is used, a 2xx or 3xx HTTP status will be interpreted as passing the health check
hcpasses 1 Number of successful health check tests before worker is re-enabled
hcfails 1 Number of failed health check tests before worker is disabled
hcinterval 30 Period of health checks in seconds (e.g. performed every 30 seconds)
hcuri   Additional URI to be appended to the worker URL for the health check.
hctemplate   Name of template, created via ProxyHCTemplate, to use for setting health check parameters for this worker
hcexpr   Name of expression, created via ProxyHCExpr, used to check response headers for health.
If not used, 2xx thru 3xx status codes imply success

Compatibility:

OPTIONS11, HEAD11 and GET11 are available in 2.4.55 and above.

Support Apache!

Topics

Directives

Bugfix checklist