Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compare nginx+Apache+mod_wsgi vs nginx+uWSGI?

What advantages and disadvantages using nginx+Apache+mod_wsgi vs nginx+uWSGI(vurtualenv) in production

Advantages of first variant using i see in that mod_wsgi developing since 2007 and have more stable version and easy administrated

Advantages of second variant is more high perfomance (see Benchmark of Python WSGI Servers, available to use uWSGI server in virtualenv that is more secure.

Disadvantage of second variant is a still no major version, need to creating something controling scripts for starting uWSGI servers for each virtual host (or use supervisor)

What do you thinking about it?

like image 575
Habibutsu Avatar asked Mar 22 '12 09:03

Habibutsu


1 Answers

When you load your typical large Python web application on top of the most popular WSGI servers, the performance difference isn't actually that much and usually nothing to get excited about. Hello world benchmarks like the one you quote are very misleading as they test a very narrow use case and the configurations used are usually never comparable. You should consider watching my PyCon talk which talk about bottlenecks in web servers and web applications.

http://pyvideo.org/video/703/web-server-bottlenecks-and-performance-tuning

Given that the WSGI server is not usually the problem, you should just choose that which you find easiest to manage and has the sorts of features you think you will require. Then use benchmarking and monitoring of that choice to work out how to set it up so as to perform best for your specific web application. Even then, any increase in performance or gains in user satisfaction are not usually going to come from such tuning.

like image 136
Graham Dumpleton Avatar answered Oct 29 '22 15:10

Graham Dumpleton