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

Consider Service.State.RUNNING_BUT_UNHEALTHY for self healing services #6089

Open
jnehlmeier opened this issue Jun 24, 2022 · 0 comments
Open

Comments

@jnehlmeier
Copy link

An application can have a service that needs to access an external service, e.g. a database, to do its job. In case that external service is not reachable for any reason, the app service should not terminate itself but instead have a way to notify about its unhealthy state. That service would then test the external service regularly until it comes back online.

So I am kind of missing something like Service.State.RUNNING_BUT_UNHEALTHY or just Service.State.UNHEALTHY so that a service can switch between STARTING -> RUNNING or STARTING -> UNHEALTHY -> RUNNING and an application can react to that situation. For example the application could disable UI sections, notify the user or simply block any requests until the unhealthy state is resolved.

Not sure if there is a workaround. If the app lets the service die, the service can not be restarted. Rescheduling a new service instance is also not possible given that ServiceManager asks for all services in its constructor and is immutable.

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