It may be written in JavaScript and thus has the overhead of a
language VM.  This especially hurts in terms of memory overhead per
process.  But node wins over apache and nginx by having the right
event model.  Good low-level primitives in libuv and the ability to
script-in assumptions.  For example, in the wheat engine that powers
howtonode.org, My database is a git repo.  I know that in git requests
for the same resource using the same git sha will *never* change.  So
I can cache that type of request aggressively in memory. (This
includes the static resources, I also store those in git)  Nginx and
Apache are general purpose static file servers.  That's can't make
that kind of caching assumptions.  Node serving a static file from
memory is faster than nginx serving the same file from disk.  Yes
javascript is slower than C, but the smarter algorithm wins out over a
slower language.

On Mon, Feb 13, 2012 at 3:22 PM, Matt <[email protected]> wrote:
> It's written in Javascript. This isn't rocket science :)
>
>
> On Mon, Feb 13, 2012 at 3:50 PM, Cosmere Infahm <[email protected]>
> wrote:
>>
>> Looking at the Node I did not see a particular reason for the higher CPU
>
>
> --
> 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

Reply via email to