Probes
Functionality that gives the application two methods for obtaining probes on a private port about service readiness/liveness.
Requires a HTTP server module.
Liveness¶
This sample is responsible for indicating whether the application is currently alive. Kora tries to start giving this sample as early as possible, so that orchestrators know for sure that there are no problems at startup and don't try to restart the application.
Example of the HTTP server path configuration for probe ping described in the HttpServerConfig
class (default values are specified):
Creating your custom viability sample requires the component to implement the interface:
The sample shall return LivenessProbeFailure
on error, and null
on success.
Readiness¶
This sample is responsible for indicating whether the application is currently ready to run.
Example of the HTTP server path configuration for probe ping described in the HttpServerConfig
class (default values are specified):
Creating your custom viability sample requires the component to implement the interface:
The sample shall return ReadinessProbeFailure
in case of error, and null
in case of success.
Recommendations¶
Tip
We strongly discourage runs that test external dependencies such as databases or other services.
If external dependencies are not available, we recommend using the CircuitBreaker pattern.
A good example for ReadinessProbe
is prob that returns an error while the service is warming up.