Skip to content

Add a health check endpoint returning database, Redis, and Stellar Horizon connectivity status #796

Description

@Chucks1093

Summary

There is no health check endpoint for the server, making it impossible for load balancers or uptime monitors to verify that all dependencies are reachable. A GET /health endpoint that probes the database, Redis, and Horizon and returns their status should be added.

Scope

  • Add GET /health endpoint that does not require authentication
  • Probe the database with a lightweight SELECT 1 query
  • Probe Redis with a PING command
  • Probe Stellar Horizon by fetching the root endpoint and checking for a 200 response
  • Return 200 with a JSON body listing each dependency and its status (ok or degraded)
  • Return 503 if any dependency is degraded, with the degraded dependencies listed

Acceptance Criteria

  • 200 returned when all dependencies are healthy
  • 503 returned when any dependency is degraded
  • Response body lists database, redis, and horizon with individual statuses
  • Endpoint responds within 2 seconds under normal conditions
  • Endpoint accessible without a JWT

ETA: 12 hours


Coordinate on Telegram

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions