Traffic (still) routed to instances not passing health check

Hey @sheerlox

Yeah. Like I described in that post, the proxy currently doesn’t check health check status if it’s starting a machine. It forwards the request to the machine as soon as it’s able to connect to it. One of the reasons for this is to make sure we don’t wait for the whole health check interval, as machine is started in context of a request and we don’t want to delay the request for such a long time. Machine may be ready to accept a request at the beginning of the interval, but the proxy will have to wait for a long time (10 seconds in your case) to forward the request.

This only happens when the proxy is starting a machine (autostart = true). If you are starting a machine manually the proxy won’t forward any request to it until it sees it in a started state with passing health checks.
And if the health check starts failing while machine is running the edge proxy will respect it and will stop forwarding requests to it.

One way to fix this in your case is to start listening for requests after the data is already loaded.

You can also try suspending the machines instead of stopping them, so that the data is already available when machine is resumed by the proxy.

1 Like