0
Under review

nginx and ubooquity success benchmark 10000 requests in 9.236 seconds

H. Truman 8 years ago updated 8 years ago 3

Hello I just setup nginx and ubooquity reverse proxy successfully. I did two benchmarking test and the results look great.

First test was done with nginx as reverse proxy like this

ab -kc 1000 -n 10000 http://104.251.217.110/admin


and it gives the following result:


Server Software: nginx/1.4.6
Server Hostname: 104.251.217.110
Server Port: 80

Document Path: /admin
Document Length: 2071 bytes

Concurrency Level: 1000
Time taken for tests: 9.236 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 10000
Total transferred: 22290000 bytes
HTML transferred: 20710000 bytes
Requests per second: 1082.67 [#/sec] (mean)
Time per request: 923.645 [ms] (mean)
Time per request: 0.924 [ms] (mean, across all concurrent requests)
Transfer rate: 2356.70 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 78 287.5 0 1747
Processing: 194 806 503.3 700 5544
Waiting: 193 775 439.2 698 4108
Total: 194 884 582.7 720 5544

Percentage of the requests served within a certain time (ms)
50% 720
66% 836
75% 1037
80% 1202
90% 1580
95% 2146
98% 2615
99% 3118
100% 5544 (longest request)


And I did the same thing with just ubooquity itself using



ab -kc 1000 -n 10000 http://104.251.217.110:2202/admin


And the test failed with the following results

Concurrency Level: 1000
Time taken for tests: 18.322 seconds
Complete requests: 10000
Failed requests: 4999



But while all of this sounds interesting I am reluctant to put this into a production server since nginx is just passing request to nanohttpd server which is not designed for that type of usage.

My concern is that nanohttpd may just be unresponsive in a production environment even if nginx is right in front of him...


PleaseTom, let me know what do you think...




Bellow is a complete result of my tests:


pi@raspberrypi:~ $ ab -kc 1000 -n 10000 http://104.251.217.110/admin
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 104.251.217.110 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software: nginx/1.4.6
Server Hostname: 104.251.217.110
Server Port: 80

Document Path: /admin
Document Length: 2071 bytes

Concurrency Level: 1000
Time taken for tests: 9.236 seconds
Complete requests: 10000
Failed requests: 0
Keep-Alive requests: 10000
Total transferred: 22290000 bytes
HTML transferred: 20710000 bytes
Requests per second: 1082.67 [#/sec] (mean)
Time per request: 923.645 [ms] (mean)
Time per request: 0.924 [ms] (mean, across all concurrent requests)
Transfer rate: 2356.70 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 78 287.5 0 1747
Processing: 194 806 503.3 700 5544
Waiting: 193 775 439.2 698 4108
Total: 194 884 582.7 720 5544

Percentage of the requests served within a certain time (ms)
50% 720
66% 836
75% 1037
80% 1202
90% 1580
95% 2146
98% 2615
99% 3118
100% 5544 (longest request)






pi@raspberrypi:~ $ ab -kc 1000 -n 10000 http://104.251.217.110:2202/admin
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 104.251.217.110 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests


Server Software:
Server Hostname: 104.251.217.110
Server Port: 2202

Document Path: /admin
Document Length: 2071 bytes

Concurrency Level: 1000
Time taken for tests: 18.322 seconds
Complete requests: 10000
Failed requests: 4999
(Connect: 0, Receive: 0, Length: 4999, Exceptions: 0)
Keep-Alive requests: 5001
Total transferred: 10998792 bytes
HTML transferred: 10363284 bytes
Requests per second: 545.78 [#/sec] (mean)
Time per request: 1832.247 [ms] (mean)
Time per request: 1.832 [ms] (mean, across all concurrent requests)
Transfer rate: 586.22 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 733 2065.9 173 15309
Processing: 0 130 153.5 172 1908
Waiting: 0 119 135.7 175 932
Total: 0 863 2105.9 355 15506

Percentage of the requests served within a certain time (ms)
50% 355
66% 439
75% 490
80% 1280
90% 1511
95% 3453
98% 7453
99% 15417
100% 15506 (longest request)


Under review

Thanks for sharing your benchmarks.

I never took the time to seriously evaluate performance under heavy load as I have always seen Ubooquity as something you deploy on a device at home with a few users from your family.

But that does not means using it for a wider usage can't be done.


As for the performance of NanoHTTPD, they'll become irrelevant with the next version since I replaced it with Jetty.

There is still a lot of work to do before I can release it, but the Jetty migration itself is almost finished, so it will definitively be part of it.

Thanks Tom...

I can't wait to try out the next ubooquity release with Jetty..


In case it is needed, please find below my nginx default file configuration located

in /etc/nginx/sites-enabled/default for debian users...

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;





# Make site accessible from http://yourdomain/
# server_name yourdomain;





location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:2202;
}
}