Forum Discussion

GlenWillms's avatar
GlenWillms
Icon for Employee rankEmployee
Mar 21, 2023

A quick post on how F5 XC Health Checks are different from BIG-IP

F5 Distributed Cloud (F5 XC) HTTP Health Checks (HC) behave differently from the basic HTTP Health Check from the beloved BIG-IP platform that F5 is known for. Because of this difference, some of your testing and real-world experiences may be a little different.

One issue you may encounter is the difference in TCP/HTTP connection handling. On BIG-IP, the HTTP HC sends a HTTP/0.9 style GET request. With HTTP/0.9, there is no persistent TCP session, and every check is a brand-new request.

By default, in F5 XC, XC will send HTTP/1.1 requests with the default behaviour of Connection: keep-alive set. This may result in Health Checks continuing to work even though new client sessions may be blocked. If this isn't desired for your health checks, you can change to a single use style health check by adding the HTTP header: Connection: Close to your health check.

Here's a table that shows the GET requests and responses between BIG-IP and XC. 

HTTP Requests

BIG-IP Basic HTTP

XC Basic HTTP

Get Request

Hypertext Transfer Protocol
    GET /\r\n
    \r\n
    [HTTP request 1/1]
Hypertext Transfer Protocol
    GET / HTTP/1.1\r\n
    host: demo.com\r\n
    user-agent: Envoy/HC\r\n
    \r\n
    [Full request URI: http://demo.com/]
    [HTTP request 1/1]

Response

Hypertext Transfer Protocol
    HTTP/1.1 200 OK\r\n
    X-Frame-Options: ALLOW-FROM \r\n
    Content-Type: text/html; charset=utf-8\r\n
    Vary: Accept-Encoding\r\n
    Date: Tue, 21 Mar 2023 15:59:11 GMT\r\n
    Connection: close\r\n
    \r\n
    [HTTP response 1/1]
    [Time since request: 0.001904999 seconds]
    [Request in frame: 14]
    [Request URI: /]
Hypertext Transfer Protocol
    HTTP/1.1 200 OK\r\n
    X-Frame-Options: ALLOW-FROM \r\n
    Content-Type: text/html; charset=utf-8\r\n
    Vary: Accept-Encoding\r\n
    Date: Tue, 21 Mar 2023 16:18:44 GMT\r\n
    Connection: keep-alive\r\n
    Keep-Alive: timeout=5\r\n
    Transfer-Encoding: chunked\r\n
    \r\n
    [HTTP response 1/1]
    [Time since request: 0.080959858 seconds]
    [Request in frame: 4]
    [Request URI: http://demo.com/]
    HTTP chunked response

Here is the JSON payload to create your own Health Check with the Connection Close header set:

{
  "metadata": {
    "name": "hc-http-connectionclose-200-302",
    "namespace": "shared",
    "labels": {},
    "annotations": {},
    "disable": false
  },
  "spec": {
    "http_health_check": {
      "use_origin_server_name": {},
      "path": "/",
      "use_http2": false,
      "headers": {
        "Connection": "Close"
      },
      "request_headers_to_remove": [],
      "expected_status_codes": [
        "200",
        "302"
      ]
    },
    "timeout": 3,
    "interval": 15,
    "jitter": 0,
    "unhealthy_threshold": 1,
    "healthy_threshold": 3,
    "jitter_percent": 30
  }
}

Thanks for reading and best of luck in your journey with F5 Distributed Cloud.