Looks very interesting! I wonder if it makes sense to have a distinction
between a health check for a "readiness check" and for a "liveness
check", as they have different semantics on platforms like
Kubernetes/OpenShift. HeikoR mentioned that this might have been
discussed in the past, but I couldn't find a thread/message discussing
this specific aspect.
Arguably, the readiness check could be handled by the container without
an application-specific logic if the application uses context listeners
to perform operations during the boot/deployment, so, perhaps it's just
a matter of making it explicit that the container should return a 503
status code when the server is still booting and/or the application is
still being deployed?
I'd also like to suggest using the status code "202 Accepted" on
appendix A, to indicate that a system is in a "degraded" state. For
instance, a system is able to receive requests and queue the
transactions, but the actual processing is delayed due to problems in a
downstream dependency. This might require a flag on the `@Health`
annotation, to state that a failure on the check doesn't mean the
application is down.
- Juca.