RkBlog

Hardware, programming and astronomy tutorials and reviews.

Nginx and Cherokee wars

Admin asked me what's the best way to host a Django app. The answer is Nginx or Cherokee (if he likes something "new"). I've been playing with Cherokee a long time ago, before Cherokee Admin and other good

Admin asked me what's the best way to host a Django app. The answer is Nginx or Cherokee (if he likes something "new"). I've been playing with Cherokee a long time ago, before Cherokee Admin and other goodies. To refresh info about Django on Cherokee I've installed ver 0.9.4 and configured it to host a Django project (local copy of this site) with SCGI. I've compared this configuration with Nginx 0.6.32 running the same application with FastCGI.

Test was simple - hit the main page few times:
httperf --client=0/1 --server=localhost --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=5 --num-calls=100
Cherokee:
Total: connections 5 requests 500 replies 500 test-duration 46.861 s
CPU time [s]: user 2.51 system 17.27 (user 5.3% system 36.9% total 42.2%)
Nginx:
Total: connections 5 requests 500 replies 500 test-duration 48.677 s
CPU time [s]: user 2.53 system 16.15 (user 5.2% system 33.2% total 38.4%)

Results are nearly equal. For now I would choose Nginx, as it can be easily configured. With cherokee-admin I had some issues with saving config for round-robin balancer - so I'm waiting for the incoming next stable Cherokee release (with new features). Some more serious tests to come :)

RkBlog

Django web framework tutorials, 28 October 2008,

Comment article