Everyone should have heard, Nodejs superior performance, concurrency is also very good, then we use Apache AB to the empty framework of node test, and then to some of the site test, or less certain reference meaning.
The Apache AB Test tool is an analog multi-threaded concurrent request that has n multiple requests sent to the server at the same time, and also makes AB a tool for some cyber attacks.
Don't talk a little, just go ahead.
Start a Web server to ensure that the request is unblocked.
123456 |
var
http = require(
‘http‘
);
http.createServer(
function
(request, response) {
response.writeHead(200, {
‘Content-Type‘
:
‘text/plain‘
});
response.end(
‘Hello node\n‘
);
}).listen(8888);
console.log(
‘Server running at http://127.0.0.1:8888/‘
);
|
I tested it under the WINDOWDS system and went to the bin under Apache's installation directory to execute the following instructions.
Description
-N1000:1000 requests issued;
-c10:10 Times concurrency
Results:
Similarly, use this method to request some websites, see the results, make a comparison, here do not show.
Pressure test of Nodejs with Apach AB for concurrent load