Health check probes

Uses: Kong Gateway

The readiness check endpoint has two states:

  • 200 OK: when Kong Gateway is ready.
  • 503 Service Temporarily Unavailable: when Kong Gateway is not ready.

The readiness endpoint does not return detailed information about the node status, but it is still useful for load balancers and other tools that need to monitor the readiness of Kong Gateway instances.

Enable the node readiness endpoint

To use the /status/ready endpoint, enable the status API server in kong.conf, and specify the port you want to use. Readiness probes should be enabled on all nodes, including standalone, Control Plane, and Data Plane nodes.

status_listen = 0.0.0.0:8100
Copied to clipboard!

For information on configuring kong.conf review the Managing Kong Gateway configuration documentation

Types of health checks

For each Kong Gateway node, there are two types of health checks:

  • Liveness: The /status endpoint responds with a 200 OK status if Kong Gateway is running. Use:

    curl -i http://localhost:8100/status
    
    Copied to clipboard!
  • Readiness: The /status/ready endpoint responds with 200 OK if Kong Gateway has a valid config and is ready to serve. Use:

    curl -i http://localhost:8100/status/ready
    
    Copied to clipboard!

These endpoints follow the Kubernetes health check probe patterns. Liveness may return 200 OK before readiness. Only use readiness probes to determine if a node is ready to receive traffic.

Readiness by node type

Readiness varies by deployment type. A 200 OK can mean something different depending on the configuration.

Kubernetes configuration

Update readinessProbe in your deployment:

readinessProbe:
  httpGet:
    path: /status/ready
    port: 8100
  initialDelaySeconds: 10
  periodSeconds: 5
Copied to clipboard!

FAQs

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!