Why does load balancing require a separate health check?

Why does Load Balancing require separate health checks? Cf is already in the middle and can monitor for any actual errors from the origin, correct?

It could even retry a failed request on another origin as fallback

1 Like

No. Your database could happily be down, rendering noting on a page that the webserver returns with a 200 response.

If a user requests https://www.example.com/no-such-file.jpg and your server returns a 404 error should Cloudflare retry each server in your pool for the non-existent file? There are lots of possible error conditions which could exist on an origin server and a lot of ways to determine server/application health. There are specific instances where we do retry connections to other servers automatically for :orange: records but we have no insight into :grey: for example.

2 Likes

Hi @sjon, I wanted to reply to this thread earlier as at least part ofwhat you’re asking about was just announced, Zero-Downtime Failover.

From the blog, “What’s better than getting notified about downtime? Never having downtime in the first place! With Zero-Downtime Failover, we can automatically retry requests to origin, even before Load Balancing kicks in.”

2 Likes

No. Your database could happily be down, rendering noting on a page that the webserver returns with a 200 response.

Maybe your webservers do - but mine are configured properly. If we cannot trust the response-code - what is the use of a health-check?

If a user requests https://www.example.com/no-such-file.jpg and your server returns a 404 error should Cloudflare retry each server in your pool for the non-existent file?

Obviously cf would only do that for responses in the 5xx range

awesome -thanks for building this so quickly for me :wink:

2 Likes

I can’t decide if you were being sarcastic or not. Is this an actual question?

1 Like

Thanks for checking, but I was indeed being sarcastic.

I’m happy to see the “Zero Downtime Failover” feature, using “Expected response codes” filtering and I’ll definitely be trying it out

1 Like