[Repoze-dev] Repoze with mod_wsgi and Varnish/Squid

Chris McDonough chrism at plope.com
Wed Mar 12 23:34:54 EDT 2008


Martin Aspeli wrote:
> Hi,
> 
> I'm what the best practice would be for running a site with Repoze and 
> Deliverance under mod_wsgi, with Varnish as a web cache.
> 
> The only way I can think to make it work would be to use Varnish on port 
> 80, proxying Apache on some different port, with Repoze under mod_wsgi. 

That's one way.

> I'm sure that'd work, but it'd be a bit annoying for the server I want 
> to configure, since it has some static file serves that wouldn't need 
> Varnish and also uses mod_dav_svn to serve up SVN.

Four other ways:

  - Use Apache's mod_cache stuff instead of Varnish (as you mentioned).

  - Don't run repoze.zope2 under Apache and instead run it under paster serve and
    proxy from Apache thru Varnish.

  - Run two Apache instances:

              Apache (80)
                  |
                  | mod_proxy
                  v
             Varnish (8888)
                  |
                  | http
                  v
                Apache (mod_wsgi)

  - Don't use Apache or varnish, and instead use Squid to both do the caching
    and the reverse proxying via its redirector setup.

- C



More information about the Repoze-dev mailing list