Skip to content

feat(api): Add a simple GET /health HTTP endpoint for load balancers #15

@intelliDean

Description

@intelliDean

Currently, the flashstat-server exposes health metrics via the flash_getHealth JSON-RPC method. While this is great for clients, many standard DevOps tools (like Kubernetes liveness probes or AWS Application Load Balancers) prefer a simple HTTP GET /health endpoint that returns a 200 OK.

We should configure the underlying jsonrpsee HTTP server to intercept requests to /health and return a simple 200 response, bypassing the JSON-RPC handler.

Acceptance Criteria:

  • Configure the jsonrpsee server builder to serve a standard HTTP 200 response on GET /health.
  • (Optional but encouraged) Return the JSON output of the SystemHealth struct in the body.
  • Update the README.md to mention this new endpoint.

Good First Issue: This involves looking into the tower middleware support within jsonrpsee and is a great networking-focused Rust task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions