Skip to content

Commit fec63fe

Browse files
committed
DEVX-533: Implement LoadBalancer Strategy based on annotation
- switched on MuxBalancer for the standalone
1 parent 2d6dccd commit fec63fe

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

core/standalone/src/main/resources/standalone.conf

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ whisk {
5656
limits-actions-invokes-concurrent = 30
5757
}
5858

59+
loadbalancer {
60+
strategy {
61+
default = "org.apache.openwhisk.core.loadBalancer.LeanBalancer"
62+
}
63+
}
64+
5965
controller {
6066
protocol = http
6167

core/standalone/src/main/scala/org/apache/openwhisk/standalone/KafkaLauncher.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import org.apache.openwhisk.common.{Logging, TransactionId}
2828
import org.apache.openwhisk.core.WhiskConfig
2929
import org.apache.openwhisk.core.WhiskConfig.kafkaHosts
3030
import org.apache.openwhisk.core.entity.ControllerInstanceId
31-
import org.apache.openwhisk.core.loadBalancer.{LeanBalancer, LoadBalancer, LoadBalancerProvider}
31+
import org.apache.openwhisk.core.loadBalancer.{LoadBalancer, LoadBalancerProvider, MuxBalancer}
3232
import org.apache.openwhisk.standalone.StandaloneDockerSupport.{checkOrAllocatePort, containerName, createRunCmd}
3333

3434
import scala.concurrent.{ExecutionContext, Future}
@@ -113,12 +113,12 @@ class KafkaLauncher(docker: StandaloneDockerClient,
113113
}
114114

115115
object KafkaAwareLeanBalancer extends LoadBalancerProvider {
116-
override def requiredProperties: Map[String, String] = LeanBalancer.requiredProperties ++ kafkaHosts
116+
override def requiredProperties: Map[String, String] = MuxBalancer.requiredProperties ++ kafkaHosts
117117

118118
override def instance(whiskConfig: WhiskConfig, instance: ControllerInstanceId)(
119119
implicit actorSystem: ActorSystem,
120120
logging: Logging,
121-
materializer: ActorMaterializer): LoadBalancer = LeanBalancer.instance(whiskConfig, instance)
121+
materializer: ActorMaterializer): LoadBalancer = MuxBalancer.instance(whiskConfig, instance)
122122
}
123123

124124
object KafkaLauncher {

0 commit comments

Comments
 (0)