How Does ELB Perform UDP Health Checks? What Are the Precautions for UDP Health Checks?

How UDP Health Checks Work

UDP is a connectionless protocol, and a UDP health check is implemented as follows:

  1. The health check node sends an ICMP request message to the backend server based on the health check configuration.
  2. After receiving the ICMP reply message, the health check node sends a UDP probe packet to the backend server.

When you use UDP for health checks, retain default parameter settings.

Troubleshooting Procedure

If the backend server is unhealthy, use either of the following methods to locate the fault:

  1. Check whether the timeout duration is too short.

    A possible cause is that the ICMP Echo Reply or ICMP Port Unreachable message returned by the backend server does not reach the health check node within the timeout duration. As a result, the health check result is inaccurate.

    It is recommended that you change the timeout duration to a larger value.

    UDP health checks are different from other health checks. If the health check timeout duration is too short, the health check result of the backend server changes between Healthy and Unhealthy frequently.

  2. Check whether the backend server restricts the rate at which ICMP messages are generated.

For Linux servers, run the following commands to query the rate limit and rate mask:

sysctl -q net.ipv4.icmp_ratelimit

The default rate limit is 1000.

sysctl -q net.ipv4.icmp_ratemask

The default rate mask is 6168.

If the returned value of the first command is the default value or 0, run the following command to remove the rate limit of Port Unreachable messages:

sysctl -w net.ipv4.icmp_ratemask=6160

For more information, see the Linux Programmer's Manual. On the Linux CLI, run the following command to display the manual:

man 7 icmp

Alternatively, visit http://man7.org/linux/man-pages/man7/icmp.7.html.

Once the rate limit is lifted, the number of ICMP Port Unreachable messages on the backend server will not be limited.

Precautions

Note the following when you configure UDP health checks:

Parent topic: Health Check