This repository has no description
0

Configure Feed

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

configs.nix-farm: keep connections to B2 alive

+8
+8
configs/nix-farm/cache.nix
··· 90 90 # decodes them via the narinfo's Compression field. 91 91 # `resolve`: looked up at runtime via resolved's stub, so an unresolvable 92 92 # B2 at startup doesn't keep nginx (and every other vhost) from starting. 93 + # `keepalive` + HTTP/1.1 below: reuse TLS connections to B2. Without them 94 + # nginx spoke HTTP/1.0 with a new handshake per request; at a farm run's 95 + # ~400 req/s B2 started closing connections mid-response. 93 96 services.nginx.appendHttpConfig = '' 94 97 upstream cache_lassul_us_b2 { 95 98 zone cache_lassul_us_b2 64k; 96 99 resolver 127.0.0.53 ipv6=off; 97 100 server ${endpoint}:443 resolve; 101 + keepalive 64; 102 + keepalive_requests 10000; 103 + keepalive_timeout 60s; 98 104 } 99 105 map $uri $cache_lassul_us_encoding { 100 106 default ""; ··· 111 117 proxy_set_header Host ${endpoint}; 112 118 proxy_ssl_server_name on; 113 119 proxy_ssl_name ${endpoint}; 120 + proxy_http_version 1.1; 121 + proxy_set_header Connection ""; 114 122 # cache keys never have a query string; don't forward one to S3 115 123 set $args ""; 116 124 # S3 answers 403 for keys missing from a bucket it won't list