Skip to content

A health endpoint for load balancers and Kubernetes probes #86

Description

@Espoir-Loem

What happens

There is no built-in health endpoint: /health answers 404. Every deployment behind a load balancer or on Kubernetes writes its own.

Proposal

An opt-in setting (for example useHealth) that serves:

  • GET /health/live: 200 as long as the process answers;
  • GET /health/ready: 200 once startup hooks have run, 503 while starting or shutting down.

The endpoints are left out of the access log and of the OpenAPI schema. They are off by default, so no path is taken from a project.

Done when

  • Both endpoints follow the startup and shutdown lifecycle, and a test proves it.
  • docs/deployment/README.md shows a Kubernetes probe that uses them.

Inspired by fastapi/fastapi#1907.

Activity

  1. added
    enhancement
    good first issue
    on Nov 5, 2026
  2. tharunsridhar commented on Nov 7, 2026

    @tharunsridhar
    Contributor

    Hi, I'd like to take this one. I'll follow the proposal in the issue: an opt-in useHealth setting that serves GET /health/live and GET /health/ready (503 while starting or shutting down), kept out of the access log and the OpenAPI schema, with a lifecycle test and a Kubernetes probe example in docs/deployment/README.md. Happy to adjust if you'd prefer a different shape.

  3. Espoir-Loem commented on Nov 7, 2026

    @Espoir-Loem
    MemberAuthor

    Hi @tharunsridhar ,

    Great to have you on board for this task ! Your summary of the proposal aligns perfectly with what we're looking for.

    Please go ahead with implementing the useHealth option to enable the /health/live and /health/ready endpoints according to the issue specifications (making sure to exclude these routes from the access logs and OpenAPI schema, and including the lifecycle test along with the documentation update in docs/deployment/README.md).

    Looking forward to your PR! Feel free to reach out if you have any questions along the way.

  4. Espoir-Loem commented on Nov 19, 2026

    @Espoir-Loem
    MemberAuthor

    Hi @tharunsridhar! Your useHealth work in #351 is in every release since, and #83 got fixed before you could start on it, sorry again for that. We now have new issues picked for contributors, and two of them fit what you did on the server side very well:

    All open ones are on the board: Nexy roadmap. Comment on the one you want and it is yours.

    To get started:

    1. Fork the repository, then follow the Quick start of CONTRIBUTING.md: it installs everything and runs the checks in about two minutes.
    2. Read the issue: it names the files to start from and what "done" means.
    3. Open a draft pull request against develop early, even a small one, and ask whenever something is unclear.

    Nexy is a young project, and its community is how it grows. If you like what you see:

    None of this is required to contribute: your pull request is what counts. Welcome back!

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

Metadata

Metadata

Assignees

Labels

enhancementgood first issue

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions