background img

The New Stuff

forever node.js services

To run node on linux environment it have to be fail-over and easy to manage service. Topic shows a different ways to run and control node.js services

#0 just node myApp.js & (PROS: simple, CONS: no fail-over, dies w/ your session (bad if you work w/ remote linux server)

#1 run as linux daemon - buzz words: w/ package manager apt-get/yum/yast/zypper --install-> nohup, upstat, monit etc. OR write some $bash scripts and put them to /etc/init.d (PROS: continuous "console"-independent run but CONS: hard to implement; failover/self-recovery)

#2 use sweet tools
  • forever (npm install and that's it) - continuous run, failover system; used in nodejitsu cloud
  • supervisor continuous run, failover system, source changes detection and on-fly pick up
  • nodemon -  same
  • foreman -  same (used in heroku if not mistaken)
First three - "node-based", foreman - Ruby
Our choice - forever  - easy to install, easy to use :)

But we will try all tools from item #2, also maybe some hard-code core bash script. 
Test report would be provided in this blog

Given by Andrew aka Sly (aza)


0 коментарі:

Дописати коментар

Popular Posts