By jeroennn
Can we run a script on the webservers that returns HTTP 200 if the server is properly configured, and HTTP 5xx if something is wrong, so the loadbalancer will take it out?
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!
This comment has been deleted
This is written in the official tutorial:
Health Checks ensure that Droplets are available. By default, they test endpoints every 10 seconds. The health check for our forwarding rule will ping each Droplet’s web server on port 80, and if the server fails to respond after three tries, it will be removed from rotation. The Load Balancer will continue to ping the server, and once it has successfully received a response 5 consecutive times, the server will be returned to the pool.
So I would guess that’s kind of a no, but you can run a cronjob script every minute that will close your port 80 or remove the server from the LB group or something else. It’s not perfect, but maybe you should suggest it on UserVoice: https://digitalocean.uservoice.com/forums/136585-digitalocean/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.