From bf4fc2462ca15942f734b1f3e1399b9979075a38 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 3 Nov 2024 10:58:25 +0000 Subject: [PATCH] style: remove trailing whitespace --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66509a9..dbfaa14 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ fastify.register(require('@fastify/under-pressure'), { #### `setTimeout` vs `setInterval` -Under the hood the `@fastify/under-pressure` uses the `setTimeout` method to perform its polling checks. The choice is based on the fact that we do not want to add additional pressure to the system. +Under the hood the `@fastify/under-pressure` uses the `setTimeout` method to perform its polling checks. The choice is based on the fact that we do not want to add additional pressure to the system. In fact, it is known that `setInterval` will call repeatedly at the scheduled time regardless of whether the previous call ended or not, and if the server is already under load, this will likely increase the problem, because those `setInterval` calls will start piling up. `setTimeout`, on the other hand, is called only once and does not cause the mentioned problem.