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 probs #117

Open
markelog opened this issue Nov 8, 2018 · 6 comments
Open

Health probs #117

markelog opened this issue Nov 8, 2018 · 6 comments
Assignees

Comments

@markelog
Copy link
Collaborator

markelog commented Nov 8, 2018

Might be a good idea to consider adding route probs, like so -

  1. https://blog.gopheracademy.com/advent-2017/kubernetes-ready-service/
  2. https://blog.gopheracademy.com/advent-2017/kubernetes-ready-service/ (Step 9).

I.e. /readyz & healthz maybe more. Or like /ping or something :)

Even in the environments without kuber in it, they sometimes named like that. And we can add another integration test which actually connects to database.

Could be fun :)

@oleg-koval
Copy link
Owner

@markelog
Do you mean creating smth like "status" endpoint?

@markelog
Copy link
Collaborator Author

Yeah! Like in https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes

Sometimes, applications are temporarily unable to serve traffic. For example, an application might need to load large data or configuration files during startup. In such cases, you don’t want to kill the application, but you don’t want to send it requests either. Kubernetes provides readiness probes to detect and mitigate these situations. A pod with containers reporting that they are not ready does not receive traffic through Kubernetes Services.

That's for readyz and health just checks if app is started or yeah status :). Something or other

@oleg-koval
Copy link
Owner

so we need to have:

  • endpoint GET /status
  • call from the container to GET /status

@markelog do you have an idea about the second one?

@markelog
Copy link
Collaborator Author

Second one might just do mongoose.connection.readyState and check if app has a connection with db... and that's should be it

@oleg-koval
Copy link
Owner

.

@markelog
Copy link
Collaborator Author

.!

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

No branches or pull requests

2 participants