caddy icon indicating copy to clipboard operation
caddy copied to clipboard

dynamic passive health check

Open akosyakov opened this issue 2 years ago • 2 comments

Is it possible to provide ratio of unhealthy request to all requests instead of unhealthy_request_count? i.e. I want to configure if >=1% of requests are unhealthy to upstream then it should be considered down.

What is the best practice of coming up with unhealthy_request_count?

akosyakov avatar Aug 10 '22 06:08 akosyakov

Currently, we're not keeping a count of total of successful requests for health checking, we only keep count of failed requests. So a ratio isn't possible right now. But we could add support that, I think. I'll revisit later.

francislavoie avatar Aug 10 '22 06:08 francislavoie

I'm starting work on this in https://github.com/caddyserver/caddy/pull/5398

francislavoie avatar Feb 26 '23 07:02 francislavoie