liveBook · Manning

Health group

As explained in Spring in Action, Sixth Edition

A health group is an Actuator health-endpoint subset that exposes a selected aspect of an application's health, such as liveness or readiness.

A health group is a focused subset of the Actuator health endpoint. It exposes a selected operational concern, especially whether an application should keep running or receive traffic. section 18.3.3

Spring Boot uses two groups for Kubernetes health decisions:

  • Liveness reports whether the application is healthy enough to continue running. A down result can cause Kubernetes to restart its pod. section 18.3.3
  • Readiness reports whether the application can receive traffic. It can remain down during initialization without causing a restart. section 18.3.3
management:
  health:
    probes:
      enabled: true

Enable the built-in liveness and readiness groups with this application.yml setting. section 18.3.3

Connecting groups to Kubernetes

Configure Kubernetes probes to call /actuator/health/liveness and /actuator/health/readiness. During startup, publish ReadinessState.REFUSING_TRAFFIC; after initialization, publish ACCEPTING_TRAFFIC. Publish LivenessState.BROKEN when the application should be restarted, and LivenessState.CORRECT when it is healthy again. section 18.3.3

How Spring in Action, Sixth Edition covers it

How deep it goes
Explains group semantics, enabling configuration, probe endpoints, deployment wiring, and availability-state changes.
Examples
Uses application.yml, Actuator endpoint paths, Kubernetes Deployment probes, and availability-change events.
What you can do after
Operate/configure Spring Boot health monitoring and connect liveness and readiness endpoints to Kubernetes probes.
How it connects
Connects Actuator health endpoints with Kubernetes, liveness probes, readiness probes, and availability states.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.