From cc455a67b0b520dd334511807a56995ed0b1d0bd Mon Sep 17 00:00:00 2001 From: MhdBashar Desoki Date: Tue, 5 Dec 2023 14:01:03 +0300 Subject: [PATCH] Update CREATE-NEW-SCALER.md clarify pollingInterval Signed-off-by: MhdBashar Desoki --- CREATE-NEW-SCALER.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CREATE-NEW-SCALER.md b/CREATE-NEW-SCALER.md index f17c0259514..d67d0248a44 100644 --- a/CREATE-NEW-SCALER.md +++ b/CREATE-NEW-SCALER.md @@ -31,7 +31,7 @@ This is the key function of a scaler; it returns: - `Value`: A numerical value that represents the state of the metric. It could be the length of a queue, or it can be the amount of lag in a stream, but it can also be a simple representation of the state. 2. A value that represents an activity of the scaler. The return type is `bool`. - KEDA polls ScaledObject object according to the `pollingInterval` configured in the ScaledObject; it checks the last time it was polled, it checks if the number of replicas is greater than 0, and if the scaler itself is active. So if the scaler returns false for `IsActive`, and if current number of replicas is greater than 0, and there is no configured minimum pods, then KEDA scales down to 0. + KEDA will check each trigger source on every ScaledObject every `pollingInterval` configured in the ScaledObject; it checks the last time it was polled, it checks if the number of replicas is greater than 0, and if the scaler itself is active. So if the scaler returns false for `IsActive`, and if current number of replicas is greater than 0, and there is no configured minimum pods, then KEDA scales down to 0. Kubernetes HPA (Horizontal Pod Autoscaler) will poll `GetMetricsAndActivity` regularly through KEDA's metric server (as long as there is at least one pod), and compare the returned value to a configured value in the ScaledObject configuration. Kubernetes will use the following formula to decide whether to scale the pods up and down: