I am new to node. I was writing a sample http server is node http module. After profiling it with jmeter
Jmeter Test Case: Number of threads: 20 Delay after every request : 5ms
Node cpu usage is varying 17%-20% with a simple program.
Node version: v0.10.0 Sample code:
var http = require('http');
var url = require("url");
http.createServer(function (req, res) {
var uri = url.parse(req.url).pathname;
var body = "";
req.on('data', function (chunk) {
body += chunk;
});
req.on('end', function () {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('hi vivek');
});
}).listen(9097, "127.0.0.1");
In my sample program I am not doing any cpu task. My questions are?