Skip to content

Commit

Permalink
Add more info about scalers and GetMetricsin README.md (#372)
Browse files Browse the repository at this point in the history
* Add more info about scalers and GetMetricsin README.md

* Move new explanation into 'docs' folder
  • Loading branch information
eashi authored and ahmelsayed committed Oct 15, 2019
1 parent e448042 commit 5f1c8fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/scalers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Scalers
_This document is in an early stage, contributions and help is appreciated_.

The scalers in KEDA are implementations of a KEDA Go interface called `scaler.go`. The key function in a scaler is `GetMetrics`; it returns a value that represents a current state of an external metric (e.g. length of a queue). Kubernetes HPA will poll `GetMetrics` regularly (as long as there is at least one pod) and compare the returned value to a configured value in the ScaledObject configuration (more about ScaledObjects below). Kubernetes will use the following formula to decide whether to scale the pods up and down:

`desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]`.

For more details check [Kubernetes HPA documentation](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/).

0 comments on commit 5f1c8fe

Please sign in to comment.