Setup:
2 cars on EC2 type m3.xlarge.
First with the ubuntu server.
The second option is win2008r2.
ubuntu node.js using a basic example to return a string response to any request.
asp.net httphandler to return the same answer.
using https://github.com/newsapps/beeswithmachineguns I used 10 machines to run 200,000 with concurrency 2000 (200 per machine) I ran a test and got:
NodeJS:
Complete requests: 200000 Requests per second: 5605.170000 [#/sec] (mean) Time per request: 358.071900 [ms] (mean) 50% response time: 31.000000 [ms] (mean) 90% response time: 239.300000 [ms] (mean)
IIS:
Complete requests: 200000 Requests per second: 9263.810000 [#/sec] (mean) Time per request: 215.992900 [ms] (mean) 50% response time: 214.000000 [ms] (mean) 90% response time: 244.000000 [ms] (mean)
NodeJS code:
http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Some response\n'); }).listen(80);
Httphandler code:
context.Response.Write("Some response\n" + Guid.NewGuid().ToString("N"));
I thought node js would be much faster, did I do something wrong?
EDIT:
after using the cluster module i got 16685 requests per second from node js i'm going to output the strongest instances of EC2 and check them
source share