Stress test of concurrent load on nodejs using Apache ab

Everyone should have heard that nodejs has superior performance and good concurrency. Then we use Apache ab to test the empty framework of node, and then test some websites, or at least some reference significance.

The Apache ab test tool simulates multi-threaded concurrent requests, that is, there are n multiple requests sent to the server at the same time, which also makes ab a tool for certain network attacks.

Not much to say, let's get started.

Start a web server first to ensure smooth requests.

1
2
3
4
5
6
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 windowsds system, entered the bin under the apache installation directory, and executed the following instructions.

illustrate:

-n1000: make 1000 requests;

-c10 : 10 concurrency

result:

Similarly, use this method to request some websites, see the results, and make a comparison, which will not be shown here.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325773965&siteId=291194637