archwiki: Do page view caching[1] with nginx for improved performance
We have used MediaWiki's file cache[2] until now, but recently the wiki has been hammered with requests from some stupid Chinese bots/crawlers. Caching at the web server level is faster as we avoid the PHP overhead and it seems to make a difference (performance wise), especially when the bots/crawlers are hitting us. This is usual done with Varnish[3], but I went with a simple Python service (30 LOC) for handling the PURGE requests as that is much simpler thn adding Varnish to our stack. [1] https://www.mediawiki.org/w/index.php?title=Manual:Performance_tuning&oldid=6670283#Page_view_caching [2] https://www.mediawiki.org/wiki/Manual:File_cache [3] https://www.mediawiki.org/wiki/Manual:Varnish_caching Fix #315
parent
c31633b9
No related branches found
No related tags found
Showing
- roles/archwiki/files/nginx-cache-purge 30 additions, 0 deletionsroles/archwiki/files/nginx-cache-purge
- roles/archwiki/tasks/main.yml 5 additions, 3 deletionsroles/archwiki/tasks/main.yml
- roles/archwiki/templates/LocalSettings.php.j2 3 additions, 3 deletionsroles/archwiki/templates/LocalSettings.php.j2
- roles/archwiki/templates/archwiki-prune-cache.service.j2 0 additions, 21 deletionsroles/archwiki/templates/archwiki-prune-cache.service.j2
- roles/archwiki/templates/archwiki-prune-cache.timer.j2 0 additions, 8 deletionsroles/archwiki/templates/archwiki-prune-cache.timer.j2
- roles/archwiki/templates/nginx-cache-purge.service.j2 11 additions, 0 deletionsroles/archwiki/templates/nginx-cache-purge.service.j2
- roles/archwiki/templates/nginx.d.conf.j2 17 additions, 2 deletionsroles/archwiki/templates/nginx.d.conf.j2
roles/archwiki/files/nginx-cache-purge
0 → 100644
Please register or sign in to comment