How to force health check?


we use Caddy as load balancer; there are 3 backend servers that serve the requests. Config looks like this:

https://:443 {
  proxy / {
    keepalive 4000
    policy round_robin
    health_check /query/alive
    health_check_interval 30s
    health_check_timeout 5s
    fail_timeout 10s
    max_fails 5

which works fine.

Due to our internal requirements, we would like to force healt_check_interval to much shorter time (e.g. 1s), but only for some limited time during upgrade of our backends. In other words we would like to let to know Caddy that our backend is (or not) working asap.

Is there any way how to do it? We tried to look for plugins, but no luck. We also looked into source code and although we don’t know about go, it looks like there is no chance how to configure it.

Any help is highly appreciated…

Thanks, stej

If you change the health_check_interval to 1s when you want the more frequent health checks, you can send caddy signal USR1 and it will reload and apply that config without dropping connections.

Can we send USR1 on Windows? Because we need it on Windows…

No, unfortunately. You can thank Microsoft for that one.

However, I’d be happy to implement a custom solution for you. We’ll be revealing a commercial support option later this year. Could I message you with the details for now?

Well you got my email in profile, feel free to contact me :slight_smile: Thx!

1 Like

Hello, still haven’t heard from you, contact me pls on klestinec (at) Thx!

I will soon! I am out of town this week.

Phew, finally got around to sending you that email. :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.