From patchwork Tue Oct 30 11:32:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2] configurehood: Introduce random delays to dilute requests From: Adrian Schmutzler X-Patchwork-Id: 944 Message-Id: <20181030113215.30320-1-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Tue, 30 Oct 2018 12:32:15 +0100 Instead of having 1000 routers accessing the KeyXchange in the same second, this will dilute the request within a period of 10 seconds. Same is done for queries from gateways. Signed-off-by: Adrian Schmutzler Reviewed-by: Robert Langhammer Reviewed-by: Christian Dresel --- Changes in v2: - Moved sleep to micron.d - Use full path for sleep - Increase upper limit to 15 seconds --- src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods b/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods index c2f56bba..997e4b76 100644 --- a/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods +++ b/src/packages/fff/fff-hoods/files/usr/lib/micron.d/fff-hoods @@ -1 +1 @@ -3-59/5 * * * * [ -f /tmp/started ] && /usr/sbin/configurehood +3-59/5 * * * * /bin/sleep $(/usr/bin/random 1 15); [ -f /tmp/started ] && /usr/sbin/configurehood