It's a good question. We (a large-scale website serving 250,000 pages/day) use Python+CherryPy for our "application server", but that's sitting behind an nginx reverse proxy.
The main reason is that nginx is much better and faster at handling certain things than Python:
* handling HTTPS and serving plain old HTTP to the application server so Python doesn't have to worry about it
* doing the gzipping of content before it goes out
* routing requests to different places/ports based on various elements matched in the URL or HTTP headers
* virtual hosts, i.e., "Host" header matching and routing things to the right place based on that
* various request sanitization, like setting client_max_body_size, ignore_invalid_headers, timeouts, etc.
Historically we've also had multiple types of application servers, some Python and some C++, and nginx routes requests to the right app server (based mainly on URL prefix).
We also use nginx to do GeoIP with the GeoIP nginx module (though arguably that would be just as simple in Python).
Edit: Note that we don't use it because our "application server is slow" (it's not). Also, I know some people use nginx to serve static content, because it's usually much faster/better than say Python at doing that -- we serve static content via Amazon S3 and a CDN, so that's a non-issue for us.
The main reason is that nginx is much better and faster at handling certain things than Python:
* handling HTTPS and serving plain old HTTP to the application server so Python doesn't have to worry about it
* doing the gzipping of content before it goes out
* routing requests to different places/ports based on various elements matched in the URL or HTTP headers
* virtual hosts, i.e., "Host" header matching and routing things to the right place based on that
* various request sanitization, like setting client_max_body_size, ignore_invalid_headers, timeouts, etc.
Historically we've also had multiple types of application servers, some Python and some C++, and nginx routes requests to the right app server (based mainly on URL prefix).
We also use nginx to do GeoIP with the GeoIP nginx module (though arguably that would be just as simple in Python).
Edit: Note that we don't use it because our "application server is slow" (it's not). Also, I know some people use nginx to serve static content, because it's usually much faster/better than say Python at doing that -- we serve static content via Amazon S3 and a CDN, so that's a non-issue for us.