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

Adding a health check that can be used to determine if the worker is healthy #1572

Merged
merged 3 commits into from
Jun 17, 2023

Conversation

bra1nDump
Copy link
Contributor

@bra1nDump bra1nDump commented Jun 14, 2023

I am using fly.io to deploy and it has health checks, but you can't specify a payload to send, has to be a simple request without any parameters.

This PR

Adds health route (any method) that renders an example mermaid diagram to ensure the worker is responsive.

Related issues in show-me chatgpt plugin project:
bra1nDump/show-me-chatgpt-plugin#42
bra1nDump/show-me-chatgpt-plugin#26

…healthy.

I am using fly.io to deploy and it has health checks, but you can't specify a payload to send, has to be a simple request without any parameters
@bra1nDump bra1nDump marked this pull request as ready for review June 14, 2023 07:23
@ggrossetie
Copy link
Member

I think we should use /health to be consistent with the gateway server:

HealthHandler healthHandler = new HealthHandler(registry.getVersions());
Handler<RoutingContext> healthHandlerService = healthHandler.create();
router.get("/health")
.handler(healthHandlerService);
router.get("/v1/health") // versioned URL (alias)
.handler(healthHandlerService);
router.get("/healthz") // k8s liveness default URL (alias)
.handler(healthHandlerService);

Is fly.io using a GET or HEAD request?

@bra1nDump
Copy link
Contributor Author

You can specify any http method. Sounds good I will change to /health

@ggrossetie
Copy link
Member

ggrossetie commented Jun 17, 2023

Thanks!
All good, running the CI just in case 😅

@ggrossetie ggrossetie merged commit 285498c into yuzutech:main Jun 17, 2023
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.

2 participants