by funthree · 13y ago · 0 comments
monit is great because you can get emails if your app goes down, it monitors files and all kinds of other stuff. you could easily use socket activation with monit so that a crashing node process drops as few connections as possible by passing along the fd to another node process, but then if you are going to do this you might as well use cluster and fork your node process.
tldr; many ways to skin a cat, but turning off your node process because it is idle is kind of weird because it has implications for the first visitor, and it shouldnt just be reached for as a standard way of running node
For large node programs, this approach may require careful optimization of the start process in the same way that we optimize the client-side page loading process.
There's a lot of great documentation on the systemd site. An exact description of socket activation and its intended use cases is on there as well: this is definitely one of them.