This section covers the specific configuration for HTTP health monitor type.

The HTTP health monitor may only be applied to a pool whose virtual service has an HTTP application profile attached.

Creating or Editing HTTP Health Monitor

You can edit the HTTP health monitor by checking the System-HTTP box and then click the edit icon.

To create a new HTTP health monitor, click Create button. Select the HTTP option from the drop-down list of the Type field. The following screen is displayed:



You can specify the following details related to HTTP settings:

  • Health Monitor Port — Specify the port defined for the server in the pool. 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.

  • Client Request Data — Specify the client request data in the USER INPUT field to send an HTTP request to the server. The converted data will be displayed in the CONVERTED VALUE PREVIEW field.

The default GET / HTTP/1.0 may be extended with additional headers or information. For instance, GET /index.htm HTTP/1.1 Host: www.site.com Connection: Close.

  • Use Exact Request — Specify the exact http_request string without any automatic insert of headers like host header.

    The system automatically adds three default headers in addition to any user-specified headers as follows where hostname is automatically derived from each pool member's configuration:

Header

Values

User-Agent

avi/1.0\r\n

Host

<hostname>\r\n

Accept

*/*;\r\n\r\n

In some situations, it may be necessary to override these default headers, for instance, to configure a specific Host header value for all servers.

To allow full control over the exact request that is sent, the exact_http_request (CLI) or Use Exact Request (GUI) option must be enabled. This option prevents the addition of these default headers. Ensure that all mandatory and required headers are explicitly configured.

  • Server Response Data — Specify the snippet of content in the USER INPUT field from the server’s HTTP response by copying and pasting text from either the source HTML or the web page of the server. Avi Load Balancer inspects raw HTML data and not rendered web pages. For instance, Avi Load Balancer does not follow HTTP redirects and will compare the redirect response with the defined Server Response string, while a browser will show the redirected page. The Server Response content is matched against the first 2KB of data returned from the server, including both headers and content/body. The Server Response data can also be used to search for a specific response code, such as 200 OK. When both Response Code and Server Response Data are populated, both must be true for the health check to pass.

  • Response Code — Select the HTTP response codes to match as successful from the drop-down list. The list displays the following values:

    • 1XX

    • 2XX

    • 3XX

    • 4XX

    • 5XX

    • ANY

A successful HTTP monitor requires either the Response Code, the Server Response Data, or both fields to be populated. The Response Code expects the server to return a response code within the specified range. For a GET request, a server should usually return a 200, 301, or 302. For a HEAD request, the server will typically return a 304. A response code by itself does not validate the server’s response content, just the status.

Server Maintenance Mode

You can use a custom server response to mark a server as disabled. During this time, health checks will continue, and servers will operate the same as if it is 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 brought online, being marked up or down as it normally would be based on the server response data.

This feature allows an application owner to gracefully bleed connections from a server prior to taking the server offline without the requirement to log into Avi Load Balancer to first place the server in the disabled state.

  • Maintenance Response Code — Specify the maintenance response code. If the defined HTTP response code is seen in the server response, place the server in maintenance mode. Multiple response codes may be used via comma separation. A successful match results in the server being marked down.

  • Maintenance Server Response Data — Specify the maintenance server response date. If the defined string is seen in the server response, place the server in maintenance mode. A successful match results in the server being marked down.

Example

The following is the sample HTTP health check send string:

GET /health/local HTTP/1.0
User-Agent: avi/1.0
Host: 10.10.10.3
Accept: */*

The following is the sample server response:

HTTP/1.0 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/plain
Content-Length: 15
Date: Fri, 20 May 2016 18:23:05 GMT
Connection: close

Health Check Ok

The server response includes both the Response Code: 200

The Server Response Data: Health Check ok

Therefore this server will be marked up.

Notice that Avi Load Balancer automatically includes additional headers in the send string, including User-Agent, Host, and Accept to ensure that the server receives a fully formed request.

SSL Attributes in HTTPS Health Monitor

The SSL encrypted traffic passes to servers without decrypting in the load balancer (the SE). Since the traffic is still SSL/HTTPS, you can conduct a relevant health monitor.