On the topic of "why use node to service static files"...

Because if you don't need to understand, configure, and maintain an
extra piece of software in your stack, things get simpler.

If node can get 10-50% faster at serving static files, then that's X
number of more deployments that don't need to complicate their
infrastructure more than it needs to be.

Given that node has built-in gzip and SSL, it's taking strides at
being a standalone web server -- even though nginx or other front end
proxies are undoubtedly better suited for those tasks.

I fully support effort being spent at making node better at doing
things web servers commonly do. It will benefit many in the community
and is time well spent.

Chris

On Feb 14, 7:42 pm, Matt <[email protected]> wrote:
> On Tue, Feb 14, 2012 at 7:00 PM, billywhizz <[email protected]> wrote:
> > Matt, there are all sorts of optimisations available. if you really
> > want top performance, then you could write a c++ module that does
> > static file serving and can be easily plugged into a node.js http
> > server.
>
> Yes, but why would you do that, when there's perfectly good open source
> code (nginx) to do it already?
>
> > it would be able to spend most of it's time in c++ land
> > serving static files so there is no reason it could not be as fast as
> > nginx. also, nginx is only optimised once - at compile time. in v8,
> > the JIT compiler has the opportunity to optimise on the fly as the
> > load on the server changes. this is a big advantage over something
> > like nginx and it wouldn't surprise me at all to see a node.js
> > solution match or out perform nginx at static file serving in the near
> > future.
>
> It's *very* rare for a JIT to do better than compiled C, except on very
> synthetic hard looping problems - HTTP serving really doesn't fit into that.
>
> > i've put a very basic benchmark up here:
> >https://gist.github.com/1831760
>
> Thank you. Kind of proves my point. Nginx serves more data, from the
> filesystem, faster, is checking for changes to the file, isn't doing
> sendfile(), etc. At least you turned logging off :)
>
> But I really appreciate seeing real numbers.
>
> 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

Reply via email to