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

Add custom path option for healthcheck #341

Open
akuma12 opened this issue Oct 23, 2024 · 1 comment · May be fixed by #342
Open

Add custom path option for healthcheck #341

akuma12 opened this issue Oct 23, 2024 · 1 comment · May be fixed by #342
Labels
enhancement New feature or request

Comments

@akuma12
Copy link

akuma12 commented Oct 23, 2024

🚀 Feature

I'd like to be able to customize the path for the health check. Currently it defaults to /health, but I'd like to be able to add my own prefix to that, such as /my_service/health or any arbitrary value.

Motivation

We use a shared load balancer with path-based routing, so we have to use app-specific prefixes for our paths, such as /my_service_1/foo and /my_service_2/bar. Because of this, the health check path also needs to start with that prefix.

Pitch

Ideally I could add a healthcheck_path to the LitServer class initialization that would override the default path of /health.

Alternatives

Currently I'm getting around this by using server.app.add_api_route, and adding a custom healthcheck method to my LitAPI class. In this method, I've tried using Requests to make a GET request to the local /health endpoint, but that actually causes LitServe to exit, so at the moment it just returns an HTTP 200 response, and doesn't actually check the readiness of the server.

@akuma12 akuma12 added the enhancement New feature or request label Oct 23, 2024
akuma12 added a commit to akuma12/LitServe that referenced this issue Oct 23, 2024
@akuma12 akuma12 linked a pull request Oct 23, 2024 that will close this issue
4 tasks
@ktrapeznikov
Copy link

Good feature to add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants