Skip to content

Instantly share code, notes, and snippets.

@rhardih
Created November 22, 2017 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhardih/c9c0b5b6a2a47b58629f8838119a7188 to your computer and use it in GitHub Desktop.
Save rhardih/c9c0b5b6a2a47b58629f8838119a7188 to your computer and use it in GitHub Desktop.
http-server vs. http.listenAndServe scale
# http-server
rene $ for i in 16 128; do ab -c $i -n $i http://127.0.0.1:8080/ | grep "Time per"; done
Time per request: 20.492 [ms] (mean)
Time per request: 1.281 [ms] (mean, across all concurrent requests)
Time per request: 138.750 [ms] (mean)
Time per request: 1.084 [ms] (mean, across all concurrent requests)
# serve
rene $ for i in 16 128; do ab -c $i -n $i http://127.0.0.1:8080/ | grep "Time per"; done
Time per request: 3.465 [ms] (mean)
Time per request: 0.217 [ms] (mean, across all concurrent requests)
Time per request: 24.720 [ms] (mean)
Time per request: 0.193 [ms] (mean, across all concurrent requests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment