Monitors are used to verify the health of an IP endpoint (application/server) so that DNS Load Balancer can properly direct traffic only to IP endpoints that are in good working order. A monitor does this verification by sending a request to the IP endpoint and then comparing the response to an expected return string. For these monitor requests to always have access to your application, you should add all of the IP addresses used for health monitors in the table below to your application’s allow list:
Deployment regions download: F5_DNSLB.Deployment.Regions_V1.0.json
Below is a table showing the different monitor types and the parameters required. Standard monitor types do not have user definable send and receive strings; instead, DNS Load Balancer will use a simple, standard send string (like a simple HEAD request for HTTP_Standard) and look for an error/non-error return to determine health.
|Monitor Type||Send/Receive Strings|
Advanced monitors allow you to specify both a send and receive string for maximum flexibility. The send string is typically a request for a specific file from the IP endpoint being evaluated, like “GET /admin/monitor.html”, which will return the contents of the file. If there is an error, like Status: 404 Not Found, then the monitor will show the IP endpoint as unhealthy. If there is no error, the monitor will compare the returned contents to the receive string to determine the health of the IP endpoint. The receive string can be a simple string to match, or it can be a regular expression for more complex evaluations.
Line termination characters:
By default, DNS Load Balancer uses HTTP 0.9 when sending monitor requests. An HTTP 0.9 request consists of only a request line, which must be terminated by a line feed (LF) character. The request line consists of a single line containing the HTTP request method, a space, and the name of the object requested (including the path, if necessary). No version is specified. No headers or request body are supported in HTTP 0.9.
You can also send an HTTP 1.0 or 1.1 request that accommodates a wider range of request options. An HTTP 1.0 or 1.1 request begins with a request line that consists of a single line containing the HTTP request method, a space, the name of the object requested (including the path, if necessary), a space, and the HTTP version of the request. The request line may be followed by a list of headers. The request line and each header line in an HTTP 1.0 or 1.1 request must be terminated with a single carriage return/line feed (CR/LF) sequence, and the end of the request headers is indicated by a terminating double carriage return/line feed sequence (CR/LF/CR/LF). For some request methods, the header list may be followed by a request body.
The header and body requirements vary depending on the request version and the request method, so the appearance of HTTP requests differ widely. For example, in an HTTP 1.0 request, no headers are required. However, in an HTTP 1.1 request, the Host header is required, although it may contain a null value. The Connection header was also added in HTTP 1.1, allowing management of Keep-Alive connections intended to serve multiple requests. While this header was not officially part of the HTTP 1.0 specification, many HTTP 1.0 implementations implicitly support or expect Keep-Alive behavior based on this header.
For detailed specifications for each HTTP version, refer to the following locations:
- For more information about HTTP 0.9 and 1.0, refer to RFC 1945.
- For more information about HTTP 1.1, refer to RFC 2616.
Constructing HTTP/HTTPS monitor send strings
The CR and LF line termination characters are key to the accurate construction and parsing of HTTP requests, regardless of the HTTP version. Depending on the tool used to examine or construct the request, the CR and LF characters may be represented by the following characters:
|Character||Text (used to construct monitor Send Strings)||Hex|
|Carriage Return (CR)||\r||0x0d|
|Line Feed (LF)||\n||0x0a|
Steps to create a monitor send string:
- Type the request line, including the HTTP method, the HTTP version (optional), and the path to the requested object, followed by a single \r\n sequence.
- Type any desired or required headers, following all but the last header with a single \r\n sequence.
- If the request contains headers but does not contain a body, terminate the Send String with a double \r\n sequence.
- If a request body is specified, precede it with a double \r\n sequence. Note: A double \r\n sequence must separate the last header from the request body.
- If the request contains a body, no terminating sequence is required.
HTTP 1.1 examples
GET /index.html HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\n\r\n
POST /form.cgi HTTP/1.1\r\nHost: host.domain.com\r\nConnection: Close\r\n\r\nFirst=Joe&Last=Cool
HTTP 1.0 examples
GET /index.html HTTP/1.0\r\n\r\n
GET /index.html HTTP/1.0\r\nUser-agent: Mozilla/3.0Gold\r\nReferer: http://host.domain.com/login.cgi\r\n\r\n
POST /form.cgi HTTP/1.0\r\n\r\nFirst=Joe&Last=Cool
HTTP 0.9 example