Mark destinations as unhealthy by default #1144
-
Currently, destinations are marked healthy by default when adding a health check (active). Is it possible to mark them as not-healthy? In my config I set an interval of 10 seconds for the health check, but if the destination is unhealthy, you only get to know this after that interval (and in between, all requests are routed to that destination anyway). I rather have an option that says "the destination is unhealthy until it says otherwise". Is that possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Destinations currently default to Active health checks are triggered immediately upon server startup, you shouldn't have to wait for the 10s interval. However, you're right that there's a time window at startup where requests could be sent to destinations in an unknown state. There are a few different ways to handling this, but let's start with one question: Since all destinations are in an unknown state at startup until the first active heath checks complete, how do you want to handle incoming requests? Should they be refused with a 503? Should they be paused until the first health checks complete? Consider this example: IActiveHealthCheckMonitor.InitialProbeCompleted reports if the first health check probe has completed. The CheckHealth endpoint is used by a orchestrator to decide if this proxy instance is ready to have requests sent to it. That way destinations are always in a known state before requests are processed. |
Beta Was this translation helpful? Give feedback.
Destinations currently default to
Unknown
, but unknown destinations are still considered when routing requests.Active health checks are triggered immediately upon server startup, you shouldn't have to wait for the 10s interval. However, you're right that there's a time window at startup where requests could be sent to destinations in an unknown state.
There are a few different ways to handling this, but let's start with one question: Since all destinations are in an unknown state at startup until the first active heath checks complete, how do you want to handle incoming requests? Should they be refused with a 503? Should they be paused until the first health checks complete?
Consider thi…