Last active
April 4, 2016 18:16
-
-
Save shavidzet/6cbfbd2d932579e7b95d3bac5e3bf869 to your computer and use it in GitHub Desktop.
Apache vs Node Benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is ApacheBench, Version 2.3 <$Revision: 1638069 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking localhost (be patient) | |
| Server Software: Apache/2.4.12 | |
| Server Hostname: localhost | |
| Server Port: 80 | |
| Document Path: /apache-app/home.php | |
| Document Length: 2 bytes | |
| Concurrency Level: 100 | |
| Time taken for tests: 4.592 seconds | |
| Complete requests: 10000 | |
| Failed requests: 0 | |
| Total transferred: 1680000 bytes | |
| HTML transferred: 20000 bytes | |
| Requests per second: 2177.90 [#/sec] (mean) | |
| Time per request: 45.916 [ms] (mean) | |
| Time per request: 0.459 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 357.31 [Kbytes/sec] received | |
| Connection Times (ms) | |
| min mean[+/-sd] median max | |
| Connect: 0 0 1.2 0 13 | |
| Processing: 6 45 12.7 42 169 | |
| Waiting: 4 44 11.7 41 168 | |
| Total: 17 46 12.6 43 169 | |
| Percentage of the requests served within a certain time (ms) | |
| 50% 43 | |
| 66% 46 | |
| 75% 48 | |
| 80% 50 | |
| 90% 58 | |
| 95% 67 | |
| 98% 87 | |
| 99% 100 | |
| 100% 169 (longest request) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Server up and running ////////////////////////// | |
| var express = require('express') | |
| , app = express() | |
| , server = require('http').createServer(app) | |
| , io = require('socket.io').listen(server) | |
| app.start = app.listen = function(){ | |
| return server.listen.apply(server, arguments) | |
| }; | |
| app.start(8080); | |
| /////////////////////////////////////////////////// | |
| // Configuration ////////////////////////////////// | |
| // change default template engine ejs to html | |
| app.engine('html', require('ejs').renderFile); | |
| app.set('view engine', 'html'); | |
| // make assets public | |
| app.use(express.static('assets')); | |
| // Routes ///////////////////////////////////////// | |
| app.get('/home', function (req, res) { | |
| res.render('index'); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This is ApacheBench, Version 2.3 <$Revision: 1638069 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking localhost (be patient) | |
| Server Software: | |
| Server Hostname: localhost | |
| Server Port: 8080 | |
| Document Path: /home | |
| Document Length: 2 bytes | |
| Concurrency Level: 100 | |
| Time taken for tests: 7.971 seconds | |
| Complete requests: 10000 | |
| Failed requests: 0 | |
| Total transferred: 1950000 bytes | |
| HTML transferred: 20000 bytes | |
| Requests per second: 1254.58 [#/sec] (mean) | |
| Time per request: 79.708 [ms] (mean) | |
| Time per request: 0.797 [ms] (mean, across all concurrent requests) | |
| Transfer rate: 238.91 [Kbytes/sec] received | |
| Connection Times (ms) | |
| min mean[+/-sd] median max | |
| Connect: 0 0 1.0 0 15 | |
| Processing: 32 79 10.4 77 145 | |
| Waiting: 32 79 10.2 76 145 | |
| Total: 38 79 10.3 77 145 | |
| Percentage of the requests served within a certain time (ms) | |
| 50% 77 | |
| 66% 79 | |
| 75% 81 | |
| 80% 83 | |
| 90% 93 | |
| 95% 102 | |
| 98% 114 | |
| 99% 120 | |
| 100% 145 (longest request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment