skip to Main Content

I’ve setup a load balancer to direct traffic to two droplets each having a container running an API service on port 8080. How do I set up my load balancer to connect to these two containers? I’m getting a 503 error whenever I try to access the API through the load balancer. However, I can access the API individually through the IP addresses of the droplet. How do I access it through the load balancer?

Pinging the IP address of the load balancer also works.

Here are my load balancer settings:

 - Forwarding rules
    1. HTTP on Port 80 -> Port 8080
    2. HTTP on port 8080 -> port 8080
 - Healthcheck on: http://0.0.0.0:80/
 - Sticky sessions: off 
 - SSL: No redirect
 - Proxty protocol: Disabled
 - Backend keepalive: yes
 - HTTP Idle Timeout: 90

It’s pretty much the same as the default.

2

Answers


  1. Chosen as BEST ANSWER

    Turns out I just had to changed the healthcheck port to the port the services are running on in the individual droplets (in this case 8080)


  2. Check the firewall settings on your droplets. Ensure that the firewall allows incoming traffic on port 8080 for the load balancer’s IP address or the appropriate range if using a cloud provider load balancer.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search