HTTP Health check using DigitalOcean Load Balancer & ServerPilot

July 31, 2018 178 views
Load Balancing Ubuntu 16.04


This is not a question, but a something that I had to share with anyone who may come across the same issue.

I have setup a Highly Available (HA) WordPress environment using 4 droplets. Two are application droplets managed by ServerPilot and the other 2 are MySQL 8.x Database servers with Group Replication, load balanced with ProxySQL (highly recommend this).

What I wanted to do was use the DO Load Balancer (LB) service for the 2 application droplets but I could not get the HTTP Health check working. The Load balancer kept on complaining that the droplets were offline, when they were not. The TCP health check was working, but I needed HTTP.

Long story short, there was no Default app for the application settings in ServerPilot, and "Deny requests for unknown domains" was ON. Since the DO Load Balancer uses a the private IPs to check the health of each droplet and not a domain, the health checks were failing (Nginx was returning a 444). Once the "Deny requests for unknown domains" was turned OFF, the LB was able to get a 200 from Nginx and everyone's happy.

Last but not least, make sure you have assigned the droplet private IPs to your applications in ServerPilot to make sure they are accessible by the LB for health checks

Hope that helps someone.


Be the first one to answer this question.