Dealing with {dead,live}locked applications
- Dominant language
- Rust
- Stars
- 5.1k
- Forks
- 329
- PR merge metrics
- No merged PRs in 30d
Description
This is mostly an application design issue, but maybe there are ways in which Tide can help users to design their application, or provide middleware that can detect/help resolve issues.
There's a few ways an application can get itself {dead,live}locked, e.g. deadlocking while locking multiple mutexes from the application `State`, panicking while holding a mutex such that all future requests instantly error with a `PoisonError`.
A common way to deal with this in todays landscape of service supervisors is to have a "health check" endpoint which verifies whether the service is currently usable, then a supervisor (such as Kubernetes) uses this endpoint to check if an instance of the service should be taken out of rotation and restarted. Tide could potentially provide pieces of a solution like this to make it easier for developers, or include examples of how such an endpoint could be designed to guide developers.
(split off from https://github.com/rustasync/tide/issues/263#issuecomment-496177676)
Contributor guide
Assessment
This issue has not been assessed yet.