Click here to share this article on LinkedIn »

This article will show performance of two web application servers nginx-unit (a new modern application web server) and uWSGI (the best one application server)

nginx-unit — the new application server powered by nginx company. It still in beta not for production use.

uWSGI — one of the best application server for python what I know. It is a old project written on C/C++ with a good performance and a lot of configuration parameters inside. This server ready for production use.

uWSGI and nginx-unit configured with 4 workers because test system has 4 cores.

Source code of Python test application, uWSGI.ini and unit.json

Simple WSGI Flask application. Just return Hello World

nginx-unit configuration json file

uWSGI configuration file

Preparation for testing

Apply nginx-unit configuration to daemon (unitd should be started before)

Start uwsgi daemon

uwsgi --ini uwsgi.ini

ab will be used for load testing. Example:

ab -n 10000 -c 500 http://127.0.0.1:8400/

Test cases

10K total requests

100K total requests

Set concurrency from 50 to 500

Result — charts with ratio between concurrency and requests per second.

Tests results

Conclusions

nginx-unit is still in beta but had a better performance than uWSGI. It still not for production use, but it is good for personal purpose and internal usage. Good solution for web developer who develop several applications in the same time. Good for testing. nginx-unit allows mix backend in the same time and put it to different ports. Lets wait for RC and start test it on production environment.

BONUS

concurrency comparison python and Go through nginx-unit

Enjoy!