diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index a6435b65..312ee7f1 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -2183,7 +2183,6 @@ func main() { fullUrl += "?amount=50" } - if isKubernetes == "true" { log.Printf("[INFO] Finished configuring kubernetes environment. Connecting to %s", fullUrl) } else { @@ -2532,6 +2531,8 @@ func main() { executionRequests.Data = executionRequests.Data[0:allowed] } } else if swarmControlMode && (swarmConfig == "run" || swarmConfig == "swarm") { + // any reason it is not maxConcurrency instead of + // hardcoded 50? if len(executionRequests.Data) > 50 { executionRequests.Data = executionRequests.Data[0:50] } @@ -4060,6 +4061,10 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest, image string, return nil } +// 0x0elliot: +// let's never increase worker replicas. +// in our tests, workers replicas mattered a lot less. +// edge-case: subflows are helped with when worker replicas are higher. func AutoScale(ctx context.Context) { if os.Getenv("SHUFFLE_SCALE_REPLICAS") != "" { return diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index ea3b748d..567b52b8 100644 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -4806,6 +4806,12 @@ func runWebserver(listener net.Listener) { } } +// 0x0elliot: +// IF we had to rewrite this, we will focus on ONLY auto scale for apps. +// i recommend we target executions/minute (?) as a metric. +// edge-case: subflows are helped with when worker replicas are higher. +// i kind of never want to scale down. at least, not now. +// also, algorithm is very broken. executions/worker func AutoScaleApps(ctx context.Context, client *dockerclient.Client, maxExecutionsPerMinute int) { ticker := time.NewTicker(1 * time.Second)