This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

configs.nix-farm: never mark B2 down in cache.lassul.us upstream

+7 -1
+7 -1
configs/nix-farm/cache.nix
··· 93 93 # `keepalive` + HTTP/1.1 below: reuse TLS connections to B2. Without them 94 94 # nginx spoke HTTP/1.0 with a new handshake per request; at a farm run's 95 95 # ~400 req/s B2 started closing connections mid-response. 96 + # `max_fails=0`: B2 closes idle keepalive connections now and then. With the 97 + # default max_fails=1 one such close marked that B2 address down for 10s; 98 + # once all of them were, every request got "no live upstreams" and a 502 99 + # (failed a farm run). A GET/HEAD on a closed reused connection is retried 100 + # (default `proxy_next_upstream error timeout`) without using up a try, on 101 + # the next address, or on the same one if it resolves to only one. 96 102 services.nginx.appendHttpConfig = '' 97 103 upstream cache_lassul_us_b2 { 98 104 zone cache_lassul_us_b2 64k; 99 105 resolver 127.0.0.53 ipv6=off; 100 - server ${endpoint}:443 resolve; 106 + server ${endpoint}:443 resolve max_fails=0; 101 107 keepalive 64; 102 108 keepalive_requests 10000; 103 109 keepalive_timeout 60s;