Production Deployment Question

74 views
Skip to first unread message

JGAui

unread,
Apr 3, 2012, 6:17:14 PM4/3/12
to nod...@googlegroups.com
I've got a site that has many components that need to run on deployment (web server, email service, photo resizer service, various jobs, etc) and I was wondering how others handle this scenario.

My initial thought was to have a master cluster that forks off all of the separate processes.   I'd put the master process in something like upstart to make sure that it kept running and ideally I'd build some logic in the master to be able restart the child processes and to gracefully restart when I need to push new code.

I've also looked into up (https://github.com/LearnBoost/up), but haven't played with it yet.

Does anybody have any suggestions?

billywhizz

unread,
Apr 3, 2012, 11:12:49 PM4/3/12
to nod...@googlegroups.com
if these are all different services listening on different ports and doing different things then i don't think cluster or "up" will be much use to you. you should just be able to use the child_process bindings in node.js to spawn each of the separate processes from a master process and listen for the exit events on each child process and respawn them when it fires.

Marak Squires

unread,
Apr 4, 2012, 1:08:04 AM4/4/12
to nod...@googlegroups.com
I built hook.io pretty much for this exact purpose. Each "hook" represents an isolated process with some really nice APIs for discovering and communicating between each other. When processes die, they are restarted by Forever and automatically reconnect.

I'd highly recommend at least understanding how this architecture works. If you think it might be the right approach then check out: http://github.com/hookio/hook.io

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
-- 
Marak Squires
Co-founder and Chief Evangelist
Nodejitsu, Inc.

Martin Wawrusch

unread,
Apr 4, 2012, 1:27:13 AM4/4/12
to nod...@googlegroups.com
+ 1 for hook.io. Or simply push your services to nodejitsu.com and let them figure out how to keep them up. And take a look at transloadit.com, that's a node based image processing service that you could use to replace your own. One less thing to worry about.
Reply all
Reply to author
Forward
0 new messages