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 a health check endpoint #26

Open
davenquinn opened this issue Nov 14, 2023 · 2 comments
Open

Add a health check endpoint #26

davenquinn opened this issue Nov 14, 2023 · 2 comments

Comments

@davenquinn
Copy link
Member

In order to support Kubernetes liveness probes we need a stable way to evaluate service health. @brianaydemir is working on the infrastructure side of this.

The ideal approach would be /status or /healthcheck endpoint that returns 200 if the service is live. I'm not sure — should this hit the database? Perhaps it could return a count of cached tiles for different layers, if we wanted the endpoint to double as a "useful" view. But maybe it's better just to successfully return with no extra database work, especially if we intend this to be hit often.

@brianaydemir
Copy link
Collaborator

brianaydemir commented Nov 14, 2023

Testing connectivity to the database might be okay — even desirable, especially if the solution to "can't connect to the database" is "restart the Pod."

It sounds to me like everything except the response's status code is ignored, so there's value in computing more only if it lets us conclude that "restart the Pod" is necessary.

@davenquinn
Copy link
Member Author

OK, I think to start we should just have something that responds 200 in all cases where a server connection is established. I think that restarting the Pod on a failed database connection is not the right answer, likely. So a basic "echo".

It'd be awesome if you could make the PR to implement this @brianaydemir

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

2 participants