Skip to content
Snippets Groups Projects

dbscripts: Enable proxy_cache_background_update for mirrorauth

Merged Jan Alexander Steffens (heftig) requested to merge mirrorauth-background-update into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
  • This allows serving a stale response even to the request that triggers
    an update. This should ensure all requests finish quickly.
    
    With just `proxy_cache_use_stale updating`, the request that attempts to
    update the cache waits for the response, while all other requests get to
    use the stale response.
    
    Currently archweb is badly overloaded and can take over half a minute to
    respond. Pacman is not that patient and fails the download.
@@ -62,8 +62,9 @@ server {
proxy_cache_key $scheme$proxy_host$uri$http_authorization;
# Minimize the number of requests to archweb
proxy_cache_lock on;
proxy_cache_use_stale updating;
proxy_cache_lock on;
proxy_cache_use_stale updating;
proxy_cache_background_update on;
# Authentication to archweb
proxy_pass https://archlinux.org;
Loading