caddy icon indicating copy to clipboard operation
caddy copied to clipboard

Add support for command line healthcheck

Open maidmaid opened this issue 2 years ago • 1 comments

As Kubernetes does, it would be interesting that Caddy proposes command line as healthcheck (only http is supported now).

An use case would be to ping a php-fpm backend thanks to the cgi-fcgi binary to check health. Something like :

reverse_proxy {
    health_exec REQUEST_METHOD=GET SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping cgi-fcgi -bind -connect /var/run/php/php-fpm.sock
}

maidmaid avatar Jan 04 '23 11:01 maidmaid

This sounds like it is just making a GET request to the fcgi socket. That's what regular healthchecks do. Why is that not sufficient?

mholt avatar May 10 '24 21:05 mholt