On Aug 27, 2015, at 3:09 AM, anymcoder wrote:

> Just tried to benchmark a simple dns lookup server with NodeJS and the 
> results turned me down. 
> I've heard NodeJS is good when dealing with heavy IO bound application, but 
> my server only serves 20 request/second. 

Are you simply starting that node program with "node program.js" (or whatever 
you called the file)? If so, you're only starting one process. If your computer 
has more than one CPU core, you can improve performance by starting additional 
processes, one per CPU core. Look up the built-in cluster module, which does 
this for you.

Also, note that you're not only testing DNS lookup here. You're also testing 
Express's web server performance. If you're interested in testing only DNS 
resolution speed, write a program that does only that, and does not use Express.


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/7B9151EF-2C89-4E47-A03E-23732A00283A%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to