12factor recommends not to daemonize processes. What are the disadvantages of doing so?
They are looking not at the daemon process itself, but at managing that process and ensuring it's running properly. They cite instances of kludgey frameworks built around daemons where the daemon was not written with an eye towards that management, thus requiring an excess of resources to restart it, clean up after it, etc.
They point out and recommend the use of system management facility software, including smf
(Solaris), upstart
(Linux), launchd
(OSX), and even hoary old init
and ttys
(older Unix versions and BSD based distros). They don't mention systemd
(also Linux), but that could be timing. They also don't mention inetd
or xinetd
that also make management and restart of network based daemon processes easy and simple.
So they aren't really recommending not to daemonize processes; they're recommending that after you invent your nifty daemon service process, you don't reinvent a management framework around it. Develop your server with an awareness of how it will be managed, and that will likely make the total effort involved much less. In current terms, this is a devops
attitude.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With