NodeJS vs. Tornado benchmarking

I ran an Apache Benchmark test on similar NodeJS and Tornado Webserver instances. Here are the results –

ab -n 10000 -c1000 192.168.1.107:8888/

Tornado (disabled console logging via --logging=none)
Server Software:        TornadoServer/2.4.1
Server Hostname:        192.168.1.107
Server Port:            8888

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      1000
Time taken for tests:   145.729 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      1700000 bytes
HTML transferred:       120000 bytes
Requests per second:    68.62 [#/sec] (mean)
Time per request:       14572.901 [ms] (mean)
Time per request:       14.573 [ms] (mean, across all concurrent requests)
Transfer rate:          11.39 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   14 203.1      1    3012
Processing:    88 14113 3198.7  15748   18858
Waiting:       15 8399 4052.4   9394   15839
Total:         88 14128 3200.1  15749   18859

Percentage of the requests served within a certain time (ms)
  50%  15749
  66%  15780
  75%  15801
  80%  15813
  90%  15839
  95%  18794
  98%  18843
  99%  18854
 100%  18859 (longest request)

NodeJS

Server Software:
Server Hostname:        192.168.1.107
Server Port:            8888

Document Path:          /
Document Length:        12 bytes

Concurrency Level:      1000
Time taken for tests:   124.844 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      1130000 bytes
HTML transferred:       120000 bytes
Requests per second:    80.10 [#/sec] (mean)
Time per request:       12484.435 [ms] (mean)
Time per request:       12.484 [ms] (mean, across all concurrent requests)
Transfer rate:          8.84 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   12 187.1      1    3009
Processing:   183 11937 3366.1  12766   18837
Waiting:       21 6747 3388.1   6419   12817
Total:        184 11949 3367.8  12766   18839

Percentage of the requests served within a certain time (ms)
  50%  12766
  66%  12792
  75%  12815
  80%  15760
  90%  15812
  95%  15826
  98%  15840
  99%  15842
 100%  18839 (longest request)

 

Observations –

  1. NodeJS spits out lesser HTML response headers than Tornado for a similar response output (see total transferred)
  2. Time taken to perform the benchmark is lesser in NodeJS at 124.84 seconds as compared to Tornado at 145.73 seconds
  3. NodeJS gives a better throughput at 80 reqs/sec as compared to Tornado at 68 reqs/sec
Advertisements

Author: anand

Currently CleverTap. Founder & ex-CTO - burrp. A techie and an entrepreneur at heart. Have worked in US, China and India.

3 thoughts on “NodeJS vs. Tornado benchmarking”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s