guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: hydra: bayfront: Disable caching of narinfo files.


From: Andreas Enge
Subject: 01/01: hydra: bayfront: Disable caching of narinfo files.
Date: Fri, 6 Dec 2019 17:06:59 -0500 (EST)

andreas pushed a commit to branch master
in repository maintenance.

commit 48192886c53f44806dc08602c6597a987a227a8c
Author: Andreas Enge <address@hidden>
Date:   Fri Dec 6 23:04:10 2019 +0100

    hydra: bayfront: Disable caching of narinfo files.
    
    * hydra/nginx/bayfront.conf: Drop narinfo from proxy_cache_path.
    * hydra/nginx/bayfront-locations.conf: Remove all proxy_cache* variables
    for narinfo.
---
 hydra/nginx/bayfront-locations.conf | 15 +++++----------
 hydra/nginx/bayfront.conf           |  7 -------
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/hydra/nginx/bayfront-locations.conf 
b/hydra/nginx/bayfront-locations.conf
index dc47eb9..601eaca 100644
--- a/hydra/nginx/bayfront-locations.conf
+++ b/hydra/nginx/bayfront-locations.conf
@@ -59,6 +59,11 @@ location /nar/ {
 }
 
 location ~ \.narinfo$ {
+    # Since 'guix publish' has its own caching, and since it relies
+    # on the atime of cached narinfos to determine whether a
+    # narinfo can be removed from the cache, don't do any caching
+    # here.
+
     proxy_pass http://localhost:3000;
 
     # For HTTP pipelining.  This has a dramatic impact on performance.
@@ -73,16 +78,6 @@ location ~ \.narinfo$ {
     proxy_read_timeout 2s;
     proxy_send_timeout 2s;
 
-    # Enable caching for narinfo files, to avoid recomputing nar signatures.
-    #
-    # Note: Avoid caching narinfos for too long to avoid a situation
-    # where we have the narinfo but don't have the corresponding nar
-    # and cannot have it.
-    proxy_cache narinfo;
-    proxy_cache_valid 200 7d;   # cache hits for 1 week
-    proxy_cache_valid 504 5m;  # timeout, when hydra.gnu.org is overloaded
-    proxy_cache_valid any 2m;   # cache misses/others for 2m
-
     # 'guix publish --ttl' produces a 'Cache-Control' header for use
     # by 'guix substitute'.  Let it through rather than use nginx's
     # "expire" directive since the expiration time defined by 'guix
diff --git a/hydra/nginx/bayfront.conf b/hydra/nginx/bayfront.conf
index 4f74ade..09274b9 100644
--- a/hydra/nginx/bayfront.conf
+++ b/hydra/nginx/bayfront.conf
@@ -46,13 +46,6 @@ http {
     # case: all that matters is that LRU sweeping happens when
     # 'max_size' is hit.
 
-    # cache for narinfo files
-    proxy_cache_path /var/cache/nginx/narinfo
-                    levels=2
-                    inactive=7d           # inactive keys removed after 7d
-                    keys_zone=narinfo:4m  # narinfo meta data: ~32K keys
-                    max_size=1g;          # total cache data size max
-
     # cache for nar files
     proxy_cache_path /var/cache/nginx/nar
                     levels=2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]