Layer 4 health check is to establish a TCP connection with backend server at regular interval. Optionally, one can specify the number of check failure before HAProxy marked the specific backend down. It can also specify a different interval to check for server up to resume. This allows a fast fail and slow start configuration.
Layer 7 health check uses HTTP OPTION call to check if backend is processing HTTP request. A 2xx or 3xx response indicate server is up. Some http server may not accept OPTION call. One can configure to use HEAD call for check.
One can also monitor the client traffic on the top of the polling type interval health check.
Health check can be defined end to end. For example, an app server depends on the database server to be available. If the database server is down, the service in the app server will be impacted. In this case, HAProxy can define the app server is depending on database server. If the database server failed health check, HAProxy can disable the app server.
No comments:
Post a Comment