Skip to main content

Load Balancing Troubleshooting

This document provides solutions for common issues that may arise while using the Load Balancing service.


Problems with services not working through load balancer

If a service is not working properly through the load balancer's private or public IP, check the possible causes and solutions below.

If the security group of the target instance does not allow traffic

If the load balancer cannot communicate with the target instance, service connections may fail. This is often due to the security group of the target instance not allowing communication with the health check IP of the load balancer.

▶️ Solution

  1. Check the communication between the load balancer and the target instance
    You need to add an inbound rule in the target instance’s security group to allow communication with the health check IP of the load balancer. The health check IP can be found in the KakaoCloud console under Load Balancing > Target Group > Targets tab. For more details, refer to Allowing health check IP communication.

  2. Configure the security group inbound rules
    Set the inbound rules of the security group to match the service port and health check protocol. For example, if the service port is 80 and the health check type is Ping, allow traffic from the health check IP for both TCP and ICMP protocols. The inbound rules can be set as follows:

    ProtocolSource IPPort Number
    TCP{health-check-ip-1}80
    TCP{health-check-ip-2}80
    ICMP{health-check-ip-1}ALL
    ICMP{health-check-ip-2}ALL

If the service on the target instance is not running

If the application using the port registered in the target group is not running on the target instance, the load balancer will not be able to connect to the service.

▶️ Solution: Verify that the application using the port connected to the load balancer is running properly on the target instance. If it is inactive, restart the application.

If the target instance status is displayed as unhealthy

Even if the security group settings and service state are correct, the target status may still be displayed as unhealthy. This is usually due to a mismatch between the HTTP status code set in the health check configuration and the status code returned by the web server.

▶️ Solution: Check that the HTTP status code set in the health check configuration matches the status code returned by the web server. For example, if the health check is configured to expect HTTP status codes between 200 and 399, but the web server returns a 500 status code, the target status will be displayed as unhealthy. Recheck the health check configuration or adjust the web server settings to ensure that the returned status code matches the expected one.