You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 justService.State.UNHEALTHY
so that a service can switch betweenSTARTING -> RUNNING
orSTARTING -> 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.The text was updated successfully, but these errors were encountered: