mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 20:46:41 +00:00
Enable backoff/retries on scaling up
- this change is needed for Docker Swarm which may give an error when several concurrent requests come in to scale a deployment. Tested on Docker Swarm before/after with the hey tool and figlet scaled down to zero replicas. Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
446c8672ae
commit
117707df14
@ -137,7 +137,8 @@ func main() {
|
||||
if config.ScaleFromZero {
|
||||
scalingConfig := scaling.ScalingConfig{
|
||||
MaxPollCount: uint(1000),
|
||||
FunctionPollInterval: time.Millisecond * 10,
|
||||
SetScaleRetries: uint(20),
|
||||
FunctionPollInterval: time.Millisecond * 50,
|
||||
CacheExpiry: time.Second * 5, // freshness of replica values before going stale
|
||||
ServiceQuery: alertHandler,
|
||||
}
|
||||
|
Reference in New Issue
Block a user