[MapProxy] How to run MapProxy under Apache?

Oliver Tonnhofer tonnhofer at omniscale.de
Thu Feb 24 04:50:12 EST 2011


On 23.02.2011, at 17:23, Andreas Trawoeger wrote:
> If there isn't any explicit need to use Apache I can highly recommend to take a look at Gunicorn [0].
> 
> Gunicorn has direct WSGI and Paster support and makes running a MapProxy webserver as simple as "gunicorn_paster /home/scheibe/mapproxy/prod/prod.ini"
> 
> If you want to combine Gunicorn with Apache you can use e.g. mod_proxy to forward request from Apache to Gunicorn/Mapproxy or use a webserver like Nginx [1] that supports high performance proxying from the beginning.

Warning, advanced technical discussion below :)

Be careful, the default worker for gunicorn are synchronous. That is, each requests blocks the whole worker process and if you have a missing tile, the process will have to wait for the source server. It's not an issue if have a full cache _and_ are using a buffering proxy in front of it (like Nginx or varnish). An Apache mod_proxy server does not help here, because Apache keeps the worker process active until the client retrieved the last byte, which can take some time.

We are using gunicorn with eventlet as a worker and that does not suffer from these issues.

Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt




More information about the MapProxy mailing list