Monitors and health checks
1 min read
There’s more to a load balancer than just distributing traffic, however.
After all, what good would it be if your load balancer and pools send a request to a server that’s offline? Or one that’s already overloaded with traffic? Ideally, your load balancer should only forward requests that a server can take care of.
That’s where another part of the load balancing equation comes in: monitors and health checks.
How it works
A monitor issues health checks periodically to evaluate the health of a each server within a pool.
Each health monitor request is trying to answer two questions:
- Is the server offline?: Does the server respond to the health monitor request at all? If so, does it respond quickly enough (as specified in the monitor’s Timeout field)?
- Is the server working as expected?: Does the server respond with the expected HTTP response codes? Does it include specific information in the response body?
If the answer to either of these questions is “No”, then the server fails the health monitor request.
This system of request and response ensures that a load balancer knows which servers can handle incoming requests.