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

K8s probes #99

Open
6aKa opened this issue Apr 10, 2023 · 3 comments
Open

K8s probes #99

6aKa opened this issue Apr 10, 2023 · 3 comments
Labels
enhancement New feature or request needs feedback

Comments

@6aKa
Copy link

6aKa commented Apr 10, 2023

Add default routes and controllers for /startup, /liveness, /readiness. And some top level functions for control liveness/readiness state (ex app.liveness(true), app.readiness(false)).

@jberger
Copy link
Member

jberger commented Apr 10, 2023

These would make an excellent plugin. I don't believe they would be a good fit for core.

@kraih kraih added enhancement New feature or request needs feedback labels Apr 10, 2023
@6aKa
Copy link
Author

6aKa commented Apr 11, 2023

Plugin bad for this. For example I have plugin for redis, and I need set readiness for false when redis down.
When this logic (probe endpoints) realised as plugin I get problem:

  1. How I can check that the probe plugin enabled from redis plugin?

If probes work globally and enabled const app = mojo({probes: true}); I can write something like this in my redis plugin

// When redis down
if (app.probesEnabled === true) {
   app.readiness(false);
}

And I can't understand how I can check server liveness from plugin:

  1. How I can check that all workers live? and not hungup?

@kraih
Copy link
Member

kraih commented Apr 11, 2023

Definitely looks like something that should be implemented as a plugin.

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

No branches or pull requests

3 participants