faas/gateway/scaling/ranges.go
Alex Ellis (OpenFaaS Ltd) d85d5e7239 Export new metrics for OpenFaaS Pro scaling
* Add service target metric
* Add service min replicas metric
* Add scale type metric

These combined allow new auto-scaling modes and parameters
for OpenFaaS Pro customers.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-01-24 14:30:08 +00:00

33 lines
929 B
Go

package scaling
const (
// DefaultMinReplicas is the minimal amount of replicas for a service.
DefaultMinReplicas = 1
// DefaultMaxReplicas is the amount of replicas a service will auto-scale up to.
DefaultMaxReplicas = 20
// DefaultScalingFactor is the defining proportion for the scaling increments.
DefaultScalingFactor = 20
// DefaultTargetLoad
DefaultTargetLoad = 10
DefaultTypeScale = "rps"
// MinScaleLabel label indicating min scale for a function
MinScaleLabel = "com.openfaas.scale.min"
// MaxScaleLabel label indicating max scale for a function
MaxScaleLabel = "com.openfaas.scale.max"
// ScalingFactorLabel label indicates the scaling factor for a function
ScalingFactorLabel = "com.openfaas.scale.factor"
// TargetLoadLabel see also DefaultTargetScale
TargetLoadLabel = "com.openfaas.scale.target"
// ScaleTypeLabel see also DefaultScaleType
ScaleTypeLabel = "com.openfaas.scale.type"
)