From 952e540d65e7c3a96ca3f323d0b703ee074aa43a Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 21 Feb 2023 18:41:12 +0900 Subject: [PATCH] ops: Add 250ms delay between warm cache requests --- production/nginx-cache-warmer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/production/nginx-cache-warmer b/production/nginx-cache-warmer index 27d1e3a8f..db025a137 100755 --- a/production/nginx-cache-warmer +++ b/production/nginx-cache-warmer @@ -120,14 +120,16 @@ do for url in / \ do warm "https://${hostname}${url}" + sleep 0.25 # wait 250ms between queries to not DoS mariadb done for slug in $slugs do warm "https://${hostname}/api/v1/mining/pool/${slug}" + sleep 0.25 # wait 250ms between queries to not DoS mariadb warm "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" + sleep 0.25 # wait 250ms between queries to not DoS mariadb warm "https://${hostname}/api/v1/mining/pool/${slug}/blocks" + sleep 0.25 # wait 250ms between queries to not DoS mariadb done - - sleep 10 done