docs: a few more ideas about auto scale
This commit is contained in:
@@ -2183,7 +2183,6 @@ func main() {
|
|||||||
fullUrl += "?amount=50"
|
fullUrl += "?amount=50"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if isKubernetes == "true" {
|
if isKubernetes == "true" {
|
||||||
log.Printf("[INFO] Finished configuring kubernetes environment. Connecting to %s", fullUrl)
|
log.Printf("[INFO] Finished configuring kubernetes environment. Connecting to %s", fullUrl)
|
||||||
} else {
|
} else {
|
||||||
@@ -2532,6 +2531,8 @@ func main() {
|
|||||||
executionRequests.Data = executionRequests.Data[0:allowed]
|
executionRequests.Data = executionRequests.Data[0:allowed]
|
||||||
}
|
}
|
||||||
} else if swarmControlMode && (swarmConfig == "run" || swarmConfig == "swarm") {
|
} else if swarmControlMode && (swarmConfig == "run" || swarmConfig == "swarm") {
|
||||||
|
// any reason it is not maxConcurrency instead of
|
||||||
|
// hardcoded 50?
|
||||||
if len(executionRequests.Data) > 50 {
|
if len(executionRequests.Data) > 50 {
|
||||||
executionRequests.Data = executionRequests.Data[0:50]
|
executionRequests.Data = executionRequests.Data[0:50]
|
||||||
}
|
}
|
||||||
@@ -4060,6 +4061,10 @@ func sendWorkerRequest(workflowExecution shuffle.ExecutionRequest, image string,
|
|||||||
return nil
|
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) {
|
func AutoScale(ctx context.Context) {
|
||||||
if os.Getenv("SHUFFLE_SCALE_REPLICAS") != "" {
|
if os.Getenv("SHUFFLE_SCALE_REPLICAS") != "" {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -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) {
|
func AutoScaleApps(ctx context.Context, client *dockerclient.Client, maxExecutionsPerMinute int) {
|
||||||
ticker := time.NewTicker(1 * time.Second)
|
ticker := time.NewTicker(1 * time.Second)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user