March 29th, 2013, 08:41 AM
[web] Newbie questions about WSGI
I'd like to learn how to write web apps in Python, and need a bit of help to understand what the options are.
From what I read, as of today, the recommended solution for Python web apps is to use the WSGI interface.
The main options are:
- Apache, using mod_wsgi, preferably in daemon mode
- Nginx or Lighttpd, using either gunicorn or uWSGI (mod_wsgi for Nginx is not recommended )
Here are the questions:
1. Are the options above correct?
2. How do those solutions work? Will the main process start a new sub-process for each query from the www server, where each sub-process consists in the Python interpreter and the actual Python script?
3. Finally, how do the www and the WSGI server talk to each other? HTTP or some server-specific protocol?