DJ,
On Tue, Feb 24, 2015 at 3:04 AM, Derk-Jan Hartman <
d.j.hartman+wmf_ml(a)gmail.com> wrote:
I haven't looked into feature sets and/or
requirements at all, but has
anyone looked into PM2 ?
https://github.com/Unitech/pm2
I know we use it internally at my company and that folks are reasonably
happy with it (compared to the other stuff that is out there).
I looked at pm2 a week ago, and found it interesting (it's listed in the
'see also' section). It does offer clustering as well, so in that respect
it's closer to service-runner. It also has startup scripts for different
environments, similar to forever-service.
There are a few things I dislike about it:
- It tries to replace init for node services, and puts a lot of effort into
the interactive UI. I'm not convinced that this is warranted or useful. I
think services should normally be started and stopped just like any other
system service, without the need to learn a tool that's specific to nodejs.
It is also quite a bit larger than the 380 lines or so in service-runner,
with most of that code spent on interactive things we don't necessarily
want / need.
- Logging is using stdout and stderr, which are both blocking. This means
that a full disk can bring down a service (happened before with Parsoid).
We have since moved to structured JSON logging with logstash over UDP/gelf,
and are careful not to block on logging or metrics.
- There seems to be no metrics reporting apart from the interactive shell.
We want to systematically monitor services and encourage developers to
further instrument their services internally, so this is important to us.
- Its heap limiting feature simply sets v8's old space limit, which means
that processes will have high latency as they spend most of their time in
GC when approaching the limit. We avoid the latency penalty by periodically
monitoring v8's internal memory stats and gracefully restarting the worker
if the limit has been breached several times in a row (and complain loudly
about it).
Gabriel