Clone this wiki locally
Welcome to the procnanny wiki!
Feature requirements for something daemontools-esque:
- good monitoring interface
- flap detection
- backoff on process restarts when fast-failing
- ability to setuid/gid
- ability to set ulimits (before setuid, obviously)
- ability to set nice and ionice values
- different process states
- differentiate between admin down and down b/c of backoff
- unix-socket interface to daemon (simple protocol)
- client requests to daemon (query, start/stop/restart, signal, etc)
- daemon publishing to client (events, etc)
- unix permissions FTW.
- someone can write a web server frontend, or puppet provider, or whatever.
- no "/service" concept. config file, config.d directory, define processes
- ability to run multiple instances of a process (and set %i in cmdline to process #, etc)
- Track history of the process (used for flap detection, monitoring, etc)
- Configurable log output
There's also administrative 'state' we can combine with state:
- starting (due to restart)
- terminating (due to restart)
- stopping (due to stop)
- stopping (due to shutdown)
- starting (due to request)
Can't be in nodejs, roughly - nodejs doesn't have fork(), so any per-process settings need to be supported by a separate tool like a shell script or other program, these include: setsid, setuid, setgid, ulimits, chdir, environment variables, etc. Node's spawn function supports chdir and environment setting, but nothing else. Further, node isn't production ready. The API changes destructively between releases, support libraries aren't very mature or well tested, etc. Maybe in 2-3 years...