Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2010-01-26 12:42:51
Size: 1258
Comment:
Revision 8 as of 2010-02-03 14:29:59
Size: 1854
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The web-server 'surfer' was given a coat of [[http://varnish-cache.org/|varnish]] in order to accelerate http access. This http-accelerator was necessary because the MoinMoin wiki is quite slow at serving requests, as it spawns many python processes for each page request, which can quickly overwhelm 'surfer'. The web-server 'surfer' was given a coat of [[http://varnish-cache.org/|varnish]] in order to accelerate http access. This http-accelerator is necessary because the MoinMoin wiki is quite slow at serving requests, as it spawns many python processes for each page request, which can quickly overwhelm 'surfer'.

{{attachment:varnish-apache-moin.png}}
Line 14: Line 16:
'''Note:''' the 8080 port is accessible only within the NMR center network!
Line 19: Line 23:
'''Note:''' it may be necessary to delete all your cookies and passwords on your browsers prior to using the 'https' link to do edits to clear-out anything using the 'http' address.
Line 21: Line 27:
The varnish config file is here: {{{/etc/varnish/default.vcl}}}. It has been edited to drop cookies for 'fswiki' and 'wiki' URLs. The varnish config file is here: {{{/etc/varnish/default.vcl}}}. It has been edited to drop cookies for 'fswiki' and 'wiki' URLs.  The apache web server was changed to listen on port 8080 instead of the default 80. varnish listens on port 80, and forwards cache misses and https connections to port 8080.
Line 28: Line 34:

''See also:''
 * http://moinmo.in/InstallationReport
 * http://fnord.no/sysadmin/web/moinmoin-spring-cleaning

Varnish on Surfer

The web-server 'surfer' was given a coat of varnish in order to accelerate http access. This http-accelerator is necessary because the MoinMoin wiki is quite slow at serving requests, as it spawns many python processes for each page request, which can quickly overwhelm 'surfer'.

varnish-apache-moin.png

User Notes

In order for varnish to cache the wiki web pages, it must ignore cookies. This has the effect of spoiling user login authentication, which makes editing impossible. The workaround for users who edit pages it to bypass varnish either by:

  • going to the 8080 port, like this:

http://surfer.nmr.mgh.harvard.edu:8080/fswiki

Note: the 8080 port is accessible only within the NMR center network!

  • or using the secure address, like this:

https://surfer.nmr.mgh.harvard.edu/fswiki

Note: it may be necessary to delete all your cookies and passwords on your browsers prior to using the 'https' link to do edits to clear-out anything using the 'http' address.

Admin Notes

The varnish config file is here: /etc/varnish/default.vcl. It has been edited to drop cookies for 'fswiki' and 'wiki' URLs. The apache web server was changed to listen on port 8080 instead of the default 80. varnish listens on port 80, and forwards cache misses and https connections to port 8080.

These utilites can be used to monitor varnish, each has a man page:

  • 'varnishhist' - displays a histogram of cache hits and misses
  • 'varnishstat' - display stats, including raw hit and miss counts
  • 'varnishtop -b -i TxURL' - display URLs that are getting passed to the server (ie. misses)

See also:

VarnishSurfer (last edited 2013-04-23 17:41:17 by NickSchmansky)