Skip to content

Instantly share code, notes, and snippets.

@rauchg
Created August 30, 2011 21:51
Show Gist options
  • Save rauchg/1182177 to your computer and use it in GitHub Desktop.
Save rauchg/1182177 to your computer and use it in GitHub Desktop.
node
∞ ~ ab -n 1000 -c 100 http://127.0.0.1:10000/
This is ApacheBench, Version 2.3 <$Revision: 1139530 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 10000
Document Path: /
Document Length: 11 bytes
Concurrency Level: 100
Time taken for tests: 0.207 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 75000 bytes
HTML transferred: 11000 bytes
Requests per second: 4831.97 [#/sec] (mean)
Time per request: 20.695 [ms] (mean)
Time per request: 0.207 [ms] (mean, across all concurrent requests)
Transfer rate: 353.90 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 1.4 1 8
Processing: 2 18 9.3 18 37
Waiting: 2 17 9.1 17 36
Total: 3 20 8.9 20 37
Percentage of the requests served within a certain time (ms)
50% 20
66% 24
75% 27
80% 29
90% 33
95% 35
98% 36
99% 36
100% 37 (longest request)
global
nbproc 1
listen http_proxy 127.0.0.1:10000
server server1 127.0.0.1:8000 weight 1
∞ ~ ab -n 1000 -c 100 http://127.0.0.1:9000/
This is ApacheBench, Version 2.3 <$Revision: 1139530 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 9000
Document Path: /
Document Length: 21 bytes
Concurrency Level: 100
Time taken for tests: 0.568 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 113000 bytes
HTML transferred: 21000 bytes
Requests per second: 1759.60 [#/sec] (mean)
Time per request: 56.831 [ms] (mean)
Time per request: 0.568 [ms] (mean, across all concurrent requests)
Transfer rate: 194.17 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.6 0 4
Processing: 25 55 14.1 55 102
Waiting: 25 55 14.1 55 102
Total: 25 55 14.0 55 102
Percentage of the requests served within a certain time (ms)
50% 55
66% 59
75% 63
80% 67
90% 74
95% 81
98% 84
99% 91
100% 102 (longest request)
var http = require('http')
, httpProxy = require('http-proxy')
, server = httpProxy.createServer(8000, 'localhost')
server.listen(9000, function () {
var addr = server.address();
console.error('Node proxy server listening on ' + addr.address + ':' + addr.port);
});
∞ ~ ab -n 1000 -c 100 http://127.0.0.1:8000/
This is ApacheBench, Version 2.3 <$Revision: 1139530 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8000
Document Path: /
Document Length: 11 bytes
Concurrency Level: 100
Time taken for tests: 0.156 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 75000 bytes
HTML transferred: 11000 bytes
Requests per second: 6423.43 [#/sec] (mean)
Time per request: 15.568 [ms] (mean)
Time per request: 0.156 [ms] (mean, across all concurrent requests)
Transfer rate: 470.47 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.8 0 4
Processing: 1 14 7.4 13 31
Waiting: 1 14 7.4 13 31
Total: 3 15 7.1 14 31
Percentage of the requests served within a certain time (ms)
50% 14
66% 18
75% 21
80% 22
90% 25
95% 27
98% 29
99% 30
100% 31 (longest request)
var http = require('http')
, server = http.createServer(request)
function request (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello world');
}
server.listen(8000, function () {
var addr = server.address();
console.error('Node server listening on ' + addr.address + ':' + addr.port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment