I did a test with ab -n 10000 -c 1000
against node.js with different configurations, each returning the string Hello World!
. Results seems odd to me.
X axis is the number of requests, y is the response time in milliseconds.
- Node is the server alone
- Node (cluster) is a server using the
cluster
module (two cores) - Nginx (balancer) is acting as a balancer in front of (two) node instances running the same code
The first thing is nginx is too slow as balancer, it has the worst result among the three. It's better than node alone only until 1000 requests (but slower than cluster). Another strange thing is that node alone has a constant response time until ~7000 (?). Starting from ~7000 requests, the cluster has a response time greater than node, and this seems too odd.
How would you interpret these results? Am I'm doing it wrong (bench or plotting errors)?
ApacheBench 2.3 (1430300), Node.js 0.10.5, nginx 1.4.1. Running on Xubuntu 13.04 x64.