graceful
Library to write graceful shutdown / upgrade service.
Install
$ cabal update
$ cabal install graceful
Controll Graceful Application
A graceful application can be controlled with signals. The master process supports the following signals
- TERM/INT
- fast shutdown
- QUIT
- graceful shutdown
- HUP
- restart workers
- starting new worker processes
- graceful shutdown old worker processes
- restart workers
- USR2
- upgrading an executable file (starting new master & worker processes)
Upgrading Executable on the Fly
- Send USR2
- Send QUIT to old process