This section covers the specific configuration for TCP health monitor type.
For any TCP application, this monitor will wait for the TCP connection establishment, send the request string, and then wait for the server to respond with the expected content. If no client request and server response are configured, the health check will pass once a TCP connection is successfully established.
To create a new TCP health monitor, click Create button. Select the TCP option from the drop-down list of the Type field. The following screen is displayed:
You can specify the following details related to TCP settings:
Health Monitor Port — Specify a port that should be used for the health check. If the monitor succeeds to this port, the load-balanced traffic will still be sent to the port of the server defined within the pool. If you do not specify any value, then the system uses the default port configured for the server.
Client Request Data — Specify the request data to send after completing the TCP handshake in the USER INPUT field. The converted data will be displayed in the CONVERTED VALUE PREVIEW field.
Half-Open (Close connection before completion) — If you check this box the monitor sends a SYN. Upon receipt of an ACK, the server is marked up and the Service Engine responds with a RST. Since the TCP handshake is never fully completed, the system does not validate application health. The purpose of this monitor option is for applications that do not gracefully handle quick termination. If the handshake is not completed, the application is not touched, no application logs are generated or app resources are wasted for setting up the connection from the health monitor.
Configure TCP health monitor to use half-open TCP connections to monitor the health of backend servers thereby avoiding consumption of a full-fledged server-side connection and the overhead and logs associated with it. This method is lightweight as it makes use of a listener in the server's kernel layer to measure the health and a child socket or user thread is not created on the server-side.
Server Response Data — Specify the expected response from the server in the USER INPUT field. Avi Load Balancer checks to see if the Server Response data is contained within the first 2KB of data returned from the server. The converted data will be displayed in the CONVERTED VALUE PREVIEW field.
Server Maintenance Mode
Maintenance Server Response Data — If the defined string is seen in the server response, place the server in maintenance mode. During this time, the system will perform the health checks, and the servers will operate the same as if manually disabled, which means existing client flows are allowed to continue, but new flows are sent to other available servers. Once a server stops responding with the maintenance string, it will be noticed by the subsequent health monitors and will be brought online, being marked up or down as it normally would do based on the server response data. Note that a manually disabled server does not receive health checks and is not automatically re-enabled.