Skip to main content
Version: 2.13

Register Health Check

Register a lambda function called to check if an application is healthy.

Description​

This brick is aimed to be used in Service Applications (backend) for infrastructure managers to check whether the running services are still running properly. (e.g.: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" target="_blank">Kubernetes Livenessprobe</a>)

It is typically used in a Service, and called once when the service is loaded.

The Check lambda input is called with a new input control flow every time the infrastructure needs to check if the backend is still up and running. If it returns a control flow, the application will be considered as healthy and uses the name input if defined to build a valid message. If Check returns an error flow, it means the application is not healthy and should probably be rebooted by the infrastructure manager.

Inputs​

  • Control Flow (Control Flow)
  • Check (Health Check): The lambda function called every time the system want to check the liveness and health of the application running this brick.
  • Name (optional) (String): An optional name used to build the error or valid message.
  • Timeout (ms) (Number): Duration in milliseconds after which, if no result has been triggered by the check lambda function, it is considered as unhealthy. If not specified, set to 1000ms
  • Probe type (ProbeType): Defines when this check should be used to check the health of the process:
    - liveness means that it will be called to verify if the process is alive.
    - readiness means that it is called to verify if the process is ready to operate
    - all combines both liveness and readiness behaviours.
    Default value is all.

Outputs​

  • Control Flow (Control Flow)