Open manics opened 4 years ago
see also: https://vertx.io/docs/vertx-health-check/java/
(I especially like:
// Status can provide addition data provided as JSON
healthCheckHandler.register("my-procedure-name", future -> {
future.complete(Status.OK(new JsonObject().put("available-memory", "2mb")));
});
)
To support horizontal scaling, e.g. in container orchestration systems, it would be helpful to have an unauthenticated endpoint to indicate whether the service was healthy. This could be fairly simple to begin with, returning a code
200
with a JSON response e.g.{"status": "ok"}
if the service is capable of servicing requests, and a HTTP error code if not. The JSON response could optionally give details of the problem but this is not essential.See for example