From ba5c2ff1ad930cfa66d8354d3c01a66aadad4de5 Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 14 Jul 2026 13:01:51 +0900 Subject: [PATCH] ops: Add test networks to nginx warm cache --- production/nginx-cache-warmer | 3 +++ production/nginx/location-liquid-api.conf | 4 ++-- production/nginx/location-liquidtestnet-api.conf | 6 +++--- production/nginx/location-signet-api.conf | 4 ++-- production/nginx/location-testnet-api.conf | 8 +++++--- production/nginx/location-testnet4-api.conf | 6 +++--- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/production/nginx-cache-warmer b/production/nginx-cache-warmer index 171f95430..d688cc04d 100755 --- a/production/nginx-cache-warmer +++ b/production/nginx-cache-warmer @@ -175,6 +175,9 @@ do for url in $warmURLs do warm "https://${hostname}${url}" + warm "https://${hostname}/testnet${url}" + warm "https://${hostname}/testnet4${url}" + warm "https://${hostname}/signet${url}" sleep $delay # delay between queries to not DoS mariadb done diff --git a/production/nginx/location-liquid-api.conf b/production/nginx/location-liquid-api.conf index a6538c6b8..c20e9a87c 100644 --- a/production/nginx/location-liquid-api.conf +++ b/production/nginx/location-liquid-api.conf @@ -90,8 +90,8 @@ location @mempool-liquid-api-v1-cache-warm { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_background_update off; - proxy_cache_use_stale error; + proxy_cache_background_update on; + proxy_cache_use_stale updating; proxy_cache apiwarm; proxy_cache_valid 200 10s; proxy_redirect off; diff --git a/production/nginx/location-liquidtestnet-api.conf b/production/nginx/location-liquidtestnet-api.conf index c7a547e03..ede04b320 100644 --- a/production/nginx/location-liquidtestnet-api.conf +++ b/production/nginx/location-liquidtestnet-api.conf @@ -94,10 +94,10 @@ location @mempool-liquidtestnet-api-v1-cache-warm { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_background_update off; - proxy_cache_use_stale error; + proxy_cache_background_update on; + proxy_cache_use_stale updating; proxy_cache apiwarm; - proxy_cache_valid 200 10s; + proxy_cache_valid 200 30s; proxy_redirect off; } diff --git a/production/nginx/location-signet-api.conf b/production/nginx/location-signet-api.conf index c184c4272..5b01394ef 100644 --- a/production/nginx/location-signet-api.conf +++ b/production/nginx/location-signet-api.conf @@ -100,8 +100,8 @@ location @mempool-signet-api-v1-cache-warm { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_background_update off; - proxy_cache_use_stale error; + proxy_cache_background_update on; + proxy_cache_use_stale updating; proxy_cache apiwarm; proxy_cache_valid 200 10s; proxy_redirect off; diff --git a/production/nginx/location-testnet-api.conf b/production/nginx/location-testnet-api.conf index 4b9433bb8..80d61198c 100644 --- a/production/nginx/location-testnet-api.conf +++ b/production/nginx/location-testnet-api.conf @@ -100,11 +100,13 @@ location @mempool-testnet-api-v1-cache-warm { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_background_update off; - proxy_cache_use_stale error; + proxy_cache_background_update on; + proxy_cache_use_stale updating; proxy_cache apiwarm; - proxy_cache_valid 200 10s; + proxy_cache_valid 200 30s; proxy_redirect off; + + expires 120s; } location @mempool-testnet-api-v1-cache-normal { diff --git a/production/nginx/location-testnet4-api.conf b/production/nginx/location-testnet4-api.conf index 11600d9e2..a24126d70 100644 --- a/production/nginx/location-testnet4-api.conf +++ b/production/nginx/location-testnet4-api.conf @@ -100,10 +100,10 @@ location @mempool-testnet4-api-v1-cache-warm { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_cache_background_update off; - proxy_cache_use_stale error; + proxy_cache_background_update on; + proxy_cache_use_stale updating; proxy_cache apiwarm; - proxy_cache_valid 200 10s; + proxy_cache_valid 200 30s; proxy_redirect off; }