Best web server performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

I am currently running a high traffic python / django site using Apache and mod_wsgi. I hope there is a faster web server configuration there, and I have heard many recommendations for lighttpd and fastcgi. Is this setting faster than apache + mod_wsgi for serving dynamic django pages (I'm already convinced that lighttpd can use static server files better)? Online tests are either poorly conducted or inconclusive, so I'm looking for some personal jokes. What architectural benefits does lighttpd + fastcgi provide? I understand that lighttpd uses epoll and that the fastcgi process will be multithreaded. Also, having two separate processes, one for lighttpd and one for the python interpreter, will be pretty useful.

I know about a tornado and its ability to process thousands of file descriptors with much fewer threads using epoll and callback. However, I would rather stick with django for now.

Thanks,

Ken

+3
source share
4 answers

I suggest nginx with superfcgi for high load websites. nginx is very fast for static files. superfcgi uses several processes with several threads that demonstrate high stability for python applications, despite the GIL, just set the number of processes to the number of processor cores on your server.

+4
source

, , , , lighttpd apache , mod_wsgi apache , - Python. (nginx mod_wsgi, , , apache, , , ! -.)

+1

, ? memcached? , -.

+1
0

Source: https://habr.com/ru/post/1718434/


All Articles