Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
HTTP Health check using DigitalOcean Load Balancer & ServerPilot
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.
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.×