On Mon, Feb 23, 2015 at 4:46 PM, S Page <spage(a)wikimedia.org> wrote:
I'm surprised there isn't something like this
already in nodejs that you
get "for free"
the closest in terms of feature set that I'm aware of is
. It has slightly more features
than service-runner even, and we would likely have used it a while ago if
there wasn't this catch about it being commercial software that also
requires a subscription.
when you use forever to run a node command. Did
consider forever-service  ? It sounds similar:
I knew about forever, but not forever-service. Thanks for the link!
Both are solving a different problem: forever basically tries to be a
replacement for daemon managers like start-stop-agent, while
forever-service hooks it up with the actual init system. Both could
potentially come in handy as part of a distribution solution on less common
platforms, especially where there isn't a good init system. On Linux we now
have a very modern init system with systemd though, and I think just using
it makes a lot of sense.
While forever (like an init system or start-stop-daemon) is all about
managing a subprocess, system-runner actually becomes part of the node
service process. It parallelizes web services by managing workers all
listening on the same socket, sets up non-blocking remote logging and
automatically collects heap metrics in each worker it spawns. It is
complementary to init systems or forever in many ways. For example, forever
or init systems typically send a SIGTERM to ask for a graceful restart,
while service-runner has a handler for SIGTERM that triggers the actual
graceful restart by instructing its workers to stop accepting new requests
& exiting after ongoing requests have finished.
It's _great_ that
mentions similar packages, I made a pull request to add forever-service to
the README though I didn't compare its features.
Thank you! I merged & tweaked it a little in a follow-up.
For small (third party) installs with limited memory,
we also added the
capability to cleanly run multiple services in a
Yay. Should MediaWiki-Vagrant use this, or does it only benefit when you're
running more -oids than just Parsoid?
The memory saving comes from only starting one process (which parsoid
already supports). Service-runner additionally lets us run multiple
services in a single process, which can save memory over having one process
per service. You lose isolation and parallelism of course, but that's an
okay price to pay if you are set on running all those services in 100mb of
RAM. Also, Parsoid does not use service-runner yet. First commit was only
I'm so excitoid
Ha! And I thought we had just freed ourselves from the *oids ;)