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

chore(health): add dedicated liveness and readiness endpoints #1987

Merged
merged 7 commits into from
Jun 18, 2024

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Jan 23, 2024

Description & motivation

When Redis fails, but Postgres is still responding, the existing liveness probe continues responding and indicating the server was healthy.

We need a more complex query to account for the state of Redis as well as Postgres when determining if the server is alive and ready to accept traffic (healthy).

Changes:

  • new /liveness endpoint
  • new /readiness endpoint
  • new handler for determining if the server is healthy by querying both Postgres and Redis.
  • provides happy path tests for the new endpoints
  • updates all readiness & liveness checks in various deployment mechanisms (docker compose, digitalocean 1-click, kubernetes helm chart) to use the new endpoints.

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

@iainsproat iainsproat marked this pull request as ready for review January 23, 2024 18:23
@iainsproat iainsproat requested a review from fabis94 June 18, 2024 10:43
@iainsproat iainsproat merged commit 7e6f31a into main Jun 18, 2024
27 of 34 checks passed
@iainsproat iainsproat deleted the iain/healthcheck-endpoint branch June 18, 2024 11:49
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.

2 participants