Load Balancer: Get number of healthy nodes through API

For my deployment, I want to check the health state of the Load Balancer first, then remove all “green” nodes, deploy to those, then add them to the LB again, then wait for 100% health before proceeding to deploy to “blue” nodes.

However, I can’t find the option to check the health status of the load balancer (i.e. the “2/2 Healthy Droplets” that is visible in the dashboard and even in the project overview).

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey @MineralWorm,

As far as I can see this is not yet available out of the box according to the API documentation here:

But this sounds like a great idea, sounds like it’d be super useful!

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

In the meantime, as a lengthy workaround, what you could do is do a ‘manual’ health check for each of the Droplets in question. With a GET request to, you would get back a list of the Droplet IDs that are part of the load balancer, and you could loop through that list and do a curl to your health check endpoint.

Hope that helps! - Bobby.