The way I understand unicorn works, is the master opens the socket
(which something like nginx proxies too) and each child pulls requests
synchronously, and somehow doing this the request queue us maintained
by the kernel (the requests just stack up on the socket). But the key
point is that the workers go to the master/parent to get work, thus it
seams possible that a child nodejs could do the same asynchronously
and upon receiving a signal would know to stop getting more work,
monitor itself and when existing work is complete, shutdown. In the
meantime, the master/parent has forked new children to handle requests
point forward.
This blog post
http://tomayko.com/writings/unicorn-is-unix covers how
it is done and why it's sexy.
-- troy
> > in ruby landhttp://
unicorn.bogomips.org/and it is a big life saver
> > in production deployments.
>
> > -- troy
>
> > --
> > 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<
nodejs%2Bunsu...@googlegroups.com>
> > .
> For more options, visit this group athttp://
groups.google.com/group/nodejs?hl=en.