Fly Machines API Wait for Health Check passing

Hi all!

I’m searching for a functionality in the Machines API similar to the /wait endpoint on a machine, that only responds when the machine is started, but for health checks.

i.e. I want to call an endpoint and only get a 2xx code back once all health checks on a machine are healthy, to know when I can send my user requests through to that machine.

Does something like this exist or would the Fly team be willing to implement something like it?

Are you saying that fly is routing requests to unhealthy machines? Sounds like a bug if it is, which has been brought up before in the past.

What wider problem are you trying to solve? Are your machines frequently unhealthy, or do you have a problem with machine outage when you deploy, etc?

Hi, no that’s not the problem. sorry if my post was unclear about that.
I’m routing traffic in my application by myself because it’s not HTTP, and I need my own application proxy. Now I want to know what method I could call from the proxy to know when a freshly started machine is ready to accept connections (my health check)

I’m routing traffic in my application by myself because it’s not HTTP, and I need my own application proxy.

Are you looking to use Fly networking primitives for this, an established load balancer package, or a custom proxy you write yourself?