system-config/playbooks/roles/zuul-web/tasks
Ian Wienand 8a2289f70a zuul-web: rework caching
mod_mem_cache was removed in Apache 2.4 so all the bits of
configuration gated by the IfModule are currently irrelevant.

The replacement is socache, the in-memory version is "shmcb" (can also
hook up to memcache, etc.).  Enable the socache module, and switch the
cache matching parts to use socache and then fall-back to disk cache
(this is what it says this will do in the manual [1])

The other part of this is to turn the CacheQuickHandler off.  The
manual says about this [2]

  In the default enabled configuration, the cache operates within the
  quick handler phase. This phase short circuits the majority of
  server processing, and represents the most performant mode of
  operation for a typical server. The cache bolts onto the front of
  the server, and the majority of server processing is avoided.

I won't claim to fully understand how our mod_rewrite rules and
mod_proxy all hang together with phases and what-not.  But emperically
with this turned on (default) we do not seem to get any caching on the
tenant status pages, and with it turned off we do.

I've deliberately removed IfModule gating as well.  This actually hid
the problem and made it much more difficult to diagnose; it is much
better if these directives just fail to start Apache if we do not have
the modules we expect to have.

[1] https://httpd.apache.org/docs/2.4/mod/mod_cache_socache.html
[2] https://httpd.apache.org/docs/2.4/mod/mod_cache.html#cachequickhandler

Change-Id: I4e5f803b9d4fb6c2351cf151a085b93a7fd20f60
2020-09-14 13:59:53 +10:00
..
main.yaml zuul-web: rework caching 2020-09-14 13:59:53 +10:00
start.yaml Pull and prune docker images together 2020-05-07 12:51:09 -07:00
stop.yaml Rework zuul start/stop/restart playbooks for docker 2020-04-27 09:34:50 -05:00