On Tue, Feb 14, 2012 at 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? >
Really? Did you really just ask this question? *Really?* 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 > -- 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
