Probes for JVM services
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
configure the three probes correctly for a Spring Boot service.
Planned topics
- Startup probe: allows slow JVM start before other probes begin.
- Readiness: should this pod receive traffic now; may include dependencies it needs to serve.
- Liveness: should the pod be restarted; keep it simple and never check the database, or a database outage restarts every pod.
- Spring Boot Actuator exposes liveness and readiness health groups (
/actuator/health/liveness,/actuator/health/readiness). - Set graceful shutdown so in-flight requests finish.
Draft outline details
Demonstration
startupProbe: { httpGet: { path: /actuator/health/liveness, port: 8080 }, failureThreshold: 30, periodSeconds: 2 }
readinessProbe: { httpGet: { path: /actuator/health/readiness, port: 8080 } }
livenessProbe: { httpGet: { path: /actuator/health/liveness, port: 8080 } }Check your understanding
Why must liveness not check the database?
Show answer
A database outage would restart all pods and worsen the incident.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.