Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /heath endpoint for checking availability #34

Open
manics opened this issue May 7, 2020 · 2 comments
Open

Add /heath endpoint for checking availability #34

manics opened this issue May 7, 2020 · 2 comments

Comments

@manics
Copy link
Member

manics commented May 7, 2020

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

@joshmoore
Copy link
Member

joshmoore commented May 8, 2020

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")));
});

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants