Readiness and Liveness probes

In Kubernetes, readiness and liveness probes are used to monitor the health of a container.

The Airlock Microgateway offers the two probe endpoints:

Probe

URL

Port

Readiness probe

/healthy
9090

Liveness probe

/alive
9090

Currently, the two endpoints do the same. But their semantics may differ in the future. The result of a call depends on the state of the internal Apache and security gate (SG) components:

Apache running?

SG running?

Response

Call successful?

Icon - OFF

Icon - OFF

no connection

Icon - OFF

Icon - OFF

Icon - ON

no connection

Icon - OFF

Icon - ON

Icon - OFF

500 Internal Server Error

Icon - OFF

Icon - ON

Icon - ON

200 OK

Icon - ON

Different timing and threshold settings should be considered between readiness and liveness checks, in order to receive a significant health status.

Readiness probe

A readiness probe can be implemented by calling /healthy and waiting for a 200 OK response.

Example Kubernetes configuration for a readiness probe:

readinessProbe:
  failureThreshold: 3
  httpGet:
    path: /healthy
    port: 9090
  initialDelaySeconds: 10

Liveness probe

Liveness of the Airlock Microgateway can be determined using the URL /alive and applying sensible failure thresholds.

  • When setting up a liveness probe, be aware that:
  • Getting a 200 OK once is not sufficient to conclude that the container is live.
  • Getting no connection once does not necessarily mean that the container is dead permanently.

Example Kubernetes configuration for a liveness probe:

livenessProbe:
  failureThreshold: 9
  timeoutSeconds: 5
  httpGet:
    path: /alive
    port: 9090
  initialDelaySeconds: 90