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

Health check endpoint is missing #96

Closed
Bhautik0110 opened this issue Aug 22, 2023 · 6 comments
Closed

Health check endpoint is missing #96

Bhautik0110 opened this issue Aug 22, 2023 · 6 comments

Comments

@Bhautik0110
Copy link

Issue

  • The health check endpoint should be there in order to verify the health checks of the application. It is helpful to detect unhealthy applications and prevent traffic redirect to unhealthy endpoints.
@AlexandrToorchyn
Copy link
Contributor

@Bhautik0110 We're waiting for rails 7.1 which has this feature out of the box:
rails/rails#46936

For now you can just use / path for healthcheck

@Bhautik0110
Copy link
Author

@AlexandrToorchyn I am new to ruby, Does rails 7.1 version mention health point checks db health status as well? Because it mentioned

Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.

@AlexandrToorchyn
Copy link
Contributor

@Bhautik0110 Rails default healthchecker doesn't include the DB healthcheck

@Bhautik0110
Copy link
Author

@AlexandrToorchyn If we can add the db health check, it is good when the server is unable to connect to DB (sometime we call it as readiness probe). While the default health check endpoint is used for server liveness check.

@BeshoyAtef
Copy link

used this , works fine

healthcheck: test: ["CMD-SHELL", "netstat -an | grep 3000 > /dev/null; if [ 0 != $? ]; then exit 1; fi;"] interval: 60s retries: 100 start_period: 20s timeout: 10s

@omohokcoj
Copy link
Contributor

@BeshoyAtef /up healthcheck endpoint has been added in the 1.3.6 release

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

No branches or pull requests

4 participants