How to troubleshoot 2 droplets with load balancer

Hello I have 2 working droplets running a nodejs application, however their status is offline according to the load balancer. How can I troubleshoot this?

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.

Site Moderator
Site Moderator badge
April 26, 2023

Heya @a8ffbc5654f0407b802fa77b829a69,

It entierly possible there is an issue with the connection between your load balancer and the Node.js application running on your droplets.

There are a couple of things you can do to troubleshoot the issue.

  1. Check your load balancer configuration: Ensure that the load balancer is correctly configured to forward traffic to your droplets. Verify the target ports, health check settings, and any other relevant configuration.

  2. Verify the droplet status: Make sure your droplets are running and responding as expected. Log in to each droplet using SSH and check the status of your Node.js application. Ensure it is running and listening on the correct IP address and port.

  3. Check application logs: Examine the logs of your Node.js application for any errors or warnings. Look for issues related to starting the application, binding to the appropriate IP and port, or processing incoming requests.

  4. Verify the droplet firewall: Check if there are any firewall rules on the droplets that might be blocking incoming connections from the load balancer. Update the rules if necessary to allow traffic from the load balancer’s IP address.

  5. Check the load balancer logs: Look for any error messages or warnings in the load balancer logs. This can provide insight into any potential issues related to the health checks or routing of traffic.

  6. Test the application endpoints: Manually test the application endpoints on each droplet using a tool like curl or Postman to ensure they are responding as expected.

  7. Test load balancer health checks: Make sure that the health check endpoint configured in the load balancer is working properly. You can do this by directly accessing the health check URL on each droplet using curl or a similar tool.

  8. Review health check settings: If the health checks are failing, review their settings in the load balancer configuration. Ensure that the health check interval, timeout, and threshold values are appropriate for your application.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel