@matt I guess it really depends on your application logic. My understanding of cluster.disconnect<http://nodejs.org/api/cluster.html#cluster_cluster_disconnect_callback> is that the worker/child will instantly close all open sockets/pipes/etc. That means that if you have a client mid-request, that request will timeout. I don't think the client will see a true connection failure, as they are technically connecting `via` the cluster master, and the socket (as far as they can see) will remain open. This kind of thing gets dangerous if you are mid-database operation or similar.
On Saturday, November 16, 2013 5:53:49 PM UTC-8, Matt Sergeant wrote: > > > On Sat, Nov 16, 2013 at 3:38 PM, Evan <[email protected] <javascript:>>wrote: > >> I was heavily influenced by Unicorn's design and signal patterns when I >> implemented actionHero's cluster >> module<https://github.com/evantahler/actionHero/blob/master/bin/methods/startCluster.js>. >> >> At it's heart is is just a wrapper around `cluster` with some signal >> handling. The trickier part was actually building my application to be >> comfortable in transitional states. For example, if the TCP/TLS server was >> signaled to shut down, it needs to ignore all incoming new connections and >> send a 'goodbye' message to all existing ones. It's nothing overly >> complicated, but it's a little more to keep in mind when developing, >> assuming your goal is 0-downtime deployments. >> > > But the cluster module handles this via worker.disconnect(). Zero downtime > updates are just a matter of spawning a new set of children and telling > your current ones to .disconnect(). > -- -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
