Improve zuul-web apache config

Compress css and javascript content as they can be quite large for zuul.

Also, cache status json results when using the non whitelabeled api
paths for zuul.opendev.org. This should improve performance for those
status files.

Change-Id: I7b965b27a88d5fda4d43be31c39989994334989c
This commit is contained in:
Clark Boylan 2020-04-27 14:27:34 -07:00
parent b0d84dc6aa
commit 6bc23598d3
2 changed files with 6 additions and 6 deletions

View File

@ -48,7 +48,7 @@
RewriteRule ^/api/(.*)$ http://127.0.0.1:9000/api/tenant/openstack/$1 [P,L]
RewriteRule ^/(.*)$ http://127.0.0.1:9000/$1 [P,L]
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/json text/css text/javascript application/javascript
<IfModule mod_cache.c>
CacheDefaultExpire 5

View File

@ -46,15 +46,15 @@
RewriteRule ^/api/tenant/(.*)/console-stream ws://127.0.0.1:9000/api/tenant/$1/console-stream [P,L]
RewriteRule ^/(.*)$ http://127.0.0.1:9000/$1 [P,L]
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/json text/css text/javascript application/javascript
<IfModule mod_cache.c>
CacheDefaultExpire 5
<IfModule mod_mem_cache.c>
# TODO: Should we cache the rest of the API too?
CacheEnable mem /api/status
# 12MByte total cache size.
MCacheSize 12288
CacheEnable mem /api/tenant/.*/status
# 80MB max cache size. 10 objects at 8MB max each.
MCacheSize 81920
MCacheMaxObjectCount 10
MCacheMinObjectSize 1
# 8MByte max size per cache entry
@ -62,7 +62,7 @@
MCacheMaxStreamingBuffer 8388608
</IfModule>
<IfModule mod_cache_disk.c>
CacheEnable disk /api/status
CacheEnable disk /api/tenant/.*/status
CacheRoot /var/cache/apache2/mod_cache_disk
CacheMaxFileSize 10000000
</IfModule>