On Thu, Feb 16, 2012 at 4:25 AM, billywhizz <[email protected]> wrote:
> Matt - just wanted to address a couple of points you made:
>
> 1. With node.js clustering you get what is effectively a layer 4 load
> balancer across the available cpu's on a single box. this is all being
> handled by the OS and is insanely fast
>
Calling require('cluster') a load balancer seems a really skewed way of
looking at things to me. I think you'd be hard pressed convincing anyone
looking for a load balancer that this was an alternative. But anyway not
one of the posts I wrote mentioned load balancing, so I don't see the point.
> 2. Restarting a server gracefully is pretty easy with a little bit of
> work
>
But taking it down because you've got something seriously broken in your
application that is breaking the database (happens ALL the time in software
companies) and can't leave the server up for another second is a scenario
this doesn't deal with.
It's a shame this "little bit of work" isn't in core yet - hopefully soon.
> 3. Recommending nginx as a reverse proxy in front on node.js for all
> scenarios seems a bit OTT to me. reverse proxies add quite a lot of
> latency to each request
Benchmarks please. I bet the overhead is nowhere near enough to make you
worry.
> and introduce another point of failure into
> the pipeline.
They've been used for over a decade at some of the largest sites you've
heard of.
> if you want to use nginx for serving static files, then
> you'd be better to serve your static from a separate host or port and
> go directly to node.js for anything non-static.
There are issues with that for certain types of sites, but yes this is
certainly another option for static file serving - but didn't address the
other issues I raised.
> imho, a reverse proxy
> should always be a last resort if no other solution is possible, and
> this is partly why i'd like to node.js performance improve, so we can
> put together simpler solutions that don't have multiple points of
> failure
>
I bet the performance is probably just fine for you.
> 4. you mentioned issues with logging when clustering over multiple
> cpu's? what exactly is the issue here and what does nginx do to solve
> it?
>
It very much depends on how you are logging. It's possible for multiple
processes writing to the same file (or stdout) to end up with overlapping
lines. Obviously if you're using syslog this isn't an issue, but I know how
much you hate additional pieces of software.
Matt.
--
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