Skip to content

Add liveness, readiness, and health endpoints#1253

Open
jake-low wants to merge 1 commit into
mainfrom
jlow/healthchecks
Open

Add liveness, readiness, and health endpoints#1253
jake-low wants to merge 1 commit into
mainfrom
jlow/healthchecks

Conversation

@jake-low

@jake-low jake-low commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Adds three new health checking endpoints:

  • /liveness always returns 200 OK (useful to check if the process is alive and answering requests)
  • /readiness answers 200 OK if the database is reachable, and 503 otherwise (a reasonable proxy for whether the instance is ready to serve traffic)
  • /health reports on the detailed health of the service. Currently it only checks DB connectivity so the status code should always be the same as /readiness, but we can add additional non-critical checks here too (like checking if the osm.org API is online). This endpoint should return a 2xx code if MapRoulette is healthy (even if non-critical external dependencies are down) so we can use it for monitoring / alerting of outages.

Once we deploy this we can switch the uptime monitor to ping /health instead of /service/info (which is like /liveness in that it always succeeds if the process is alive, even if the DB is down) which will help detect outages that we currently miss. The orchestrator can switch to using /liveness and/or /readiness to see if the process itself is alive and ready to serve requests.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

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.

1 participant