Adds spring-boot-startup-time/, the companion project for BLOG-618: a runnable Spring Boot 4.1.1 application on JDK 25 that installs BufferingApplicationStartup and FlightRecorderApplicationStartup behind a system property, and a /diag/startup endpoint that computes step self time -- the number /actuator/startup does not give you and the one that names the actual culprits. Captured under docs/output/: the step tree sorted both ways, the same startup as JFR events, a +5000-class experiment putting 0.11 ms per scanned class on the classpath scan tax, the silent truncation a 2048-step buffer performs, and JDK 25 AOT cache timings (6.93 s to 4.82 s). Post body and metadata live in post/. Moves the existing Actuator project into actuator-in-production/ so the repository holds one directory per article; the root README is now an index.
66 lines
1.9 KiB
Plaintext
66 lines
1.9 KiB
Plaintext
### profile: groups
|
|
|
|
--- baseline: upstream UP ---
|
|
GET /actuator/health HTTP 503
|
|
GET /actuator/health/liveness HTTP 200
|
|
GET /actuator/health/readiness HTTP 200
|
|
GET /actuator/health/startup HTTP 200
|
|
|
|
--- upstream DOWN (a third party is having an outage) ---
|
|
GET /actuator/health HTTP 503
|
|
GET /actuator/health/liveness HTTP 200
|
|
GET /actuator/health/readiness HTTP 503
|
|
GET /actuator/health/startup HTTP 200
|
|
|
|
liveness stayed 200. readiness went 503.
|
|
Kubernetes takes this instance out of the Service and leaves the process alone.
|
|
Wire readiness to /actuator/health and you get a restart loop instead.
|
|
|
|
--- what each group contains ---
|
|
$ curl -s http://localhost:8080/actuator/health/liveness
|
|
{
|
|
"components": {
|
|
"diskSpace": {
|
|
"details": {
|
|
"total": 10213466112,
|
|
"free": 3877605376,
|
|
"threshold": 10485760,
|
|
"path": "/tmp/work/spring-boot-demo/.",
|
|
"exists": true
|
|
},
|
|
"status": "UP"
|
|
},
|
|
"livenessState": {
|
|
"status": "UP"
|
|
}
|
|
},
|
|
"status": "UP"
|
|
}
|
|
$ curl -s http://localhost:8080/actuator/health/readiness
|
|
{
|
|
"components": {
|
|
"externalApi": {
|
|
"details": {
|
|
"error": "org.springframework.web.client.HttpServerErrorException$ServiceUnavailable: 503 : \"upstream unavailable\"",
|
|
"url": "http://localhost:8080/stub/upstream/ping",
|
|
"latencyMs": 66,
|
|
"timeoutMs": 750
|
|
},
|
|
"status": "DOWN"
|
|
},
|
|
"ordersDatabase": {
|
|
"details": {
|
|
"orders": 3,
|
|
"queryMs": 0,
|
|
"slowThresholdMs": 250
|
|
},
|
|
"status": "UP"
|
|
},
|
|
"readinessState": {
|
|
"status": "UP"
|
|
}
|
|
},
|
|
"status": "DOWN"
|
|
}
|
|
|