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

DM-43288: Add a health check endpoint #984

Merged
merged 1 commit into from
Mar 15, 2024
Merged

DM-43288: Add a health check endpoint #984

merged 1 commit into from
Mar 15, 2024

Conversation

rra
Copy link
Member

@rra rra commented Mar 13, 2024

Add a new internal endpoint, /health, which checks the database, Redis, and (if configured) LDAP and raises an uncaught exception if any of them fail. This will be used as a Kubernetes liveness check to address the issues we've had with Gafaelfawr recovering from Redis or LDAP outages and losing its database connections.

Add a new internal endpoint, /health, which checks the database,
Redis, and (if configured) LDAP and raises an uncaught exception if
any of them fail. This will be used as a Kubernetes liveness check
to address the issues we've had with Gafaelfawr recovering from
Redis or LDAP outages and losing its database connections.
@rra
Copy link
Member Author

rra commented Mar 13, 2024

This seemed worth a code review, not because the code is all that complex, but because I wasn't sure if you had any thoughts about the best way to structure health checks like this. We'll eventually want to add these to more applications (and in some cases will need to implement the IVOA availability endpoint).

Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good. I don't have any ideas on how to do it differently, so I think we can go with this.

@rra rra merged commit bad3398 into main Mar 15, 2024
5 checks passed
@rra rra deleted the tickets/DM-43288 branch March 15, 2024 21:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants