LearnBoost / up

Zero-downtime reloads and requests load balancer based on distribute.
540 stars 73 forks source link

Add an option to write a file with the pid. #12

Closed wvl closed 12 years ago

wvl commented 12 years ago

By writing the pid to a file, it's easier to automate a restart, since then it's just:

up --pidfile pidfile.txt lib/server.js
kill -s SIGUSR2 `cat pidfile.txt`
tj commented 12 years ago

other than the tweaks +1

wvl commented 12 years ago

Okay, I made the parameters mandatory, and added a note to the README.

Note that for some reason, debug mode is forced on: process.env.DEBUG = (process.env.DEBUG ? ',' : '') + 'up,up-cli';

tj commented 12 years ago

ah I didn't see that

rauchg commented 12 years ago

up CLI was mostly meant for development. If you guys think it's useful for production as well, we should add pidfile + make the forced DEBUG only for NODE_ENV = 'development'.

rauchg commented 12 years ago

My worry is that the CLI interface could become infinitely complex.

kishorenc commented 12 years ago

@guille What do you guys then use for production? I am using Node's core cluster module for forking workers currently, but that does not support zero downtime restart etc. Should I be tackling this zero downtime problem on a load balancer level?

shinuza commented 12 years ago

Installed up just now and wondered why the CLI didn't have a --pidfile option while the documentation says it does... :)

rauchg commented 12 years ago

Oops.

On Sunday, March 4, 2012, Samori Gorse < reply@reply.github.com> wrote:

Installed up just now and wondered why the CLI didn't have a --pidfile option while the documentation says it does... :)


Reply to this email directly or view it on GitHub: https://github.com/LearnBoost/up/pull/12#issuecomment-4314643

Guillermo Rauch LearnBoost CTO http://devthought.com