package routing
- Alphabetic
- Public
- All
Type Members
-
final
case class
ClusterRouterGroup
(local: Group, settings: ClusterRouterGroupSettings) extends Group with ClusterRouterConfigBase with Product with Serializable
akka.routing.RouterConfig implementation for deployment on cluster nodes.
akka.routing.RouterConfig implementation for deployment on cluster nodes. Delegates other duties to the local akka.routing.RouterConfig, which makes it possible to mix this with the built-in routers such as akka.routing.RoundRobinGroup or custom routers.
- Annotations
- @SerialVersionUID()
-
final
case class
ClusterRouterGroupSettings
(totalInstances: Int, routeesPaths: Seq[String], allowLocalRoutees: Boolean, useRole: Option[String]) extends ClusterRouterSettingsBase with Product with Serializable
totalInstances
of cluster router must be > 0totalInstances
of cluster router must be > 0- Annotations
- @SerialVersionUID()
-
final
case class
ClusterRouterPool
(local: Pool, settings: ClusterRouterPoolSettings) extends Pool with ClusterRouterConfigBase with Product with Serializable
akka.routing.RouterConfig implementation for deployment on cluster nodes.
akka.routing.RouterConfig implementation for deployment on cluster nodes. Delegates other duties to the local akka.routing.RouterConfig, which makes it possible to mix this with the built-in routers such as akka.routing.RoundRobinGroup or custom routers.
- Annotations
- @SerialVersionUID()
-
final
case class
ClusterRouterPoolSettings
(totalInstances: Int, maxInstancesPerNode: Int, allowLocalRoutees: Boolean, useRole: Option[String]) extends ClusterRouterSettingsBase with Product with Serializable
totalInstances
of cluster router must be > 0maxInstancesPerNode
of cluster router must be > 0maxInstancesPerNode
of cluster router must be 1 when routeesPath is definedtotalInstances
of cluster router must be > 0maxInstancesPerNode
of cluster router must be > 0maxInstancesPerNode
of cluster router must be 1 when routeesPath is defined- Annotations
- @SerialVersionUID()
-
final
case class
AdaptiveLoadBalancingGroup
(metricsSelector: MetricsSelector = MixMetricsSelector, paths: Iterable[String] = Nil, routerDispatcher: String = Dispatchers.DefaultDispatcherId) extends Group with Product with Serializable
A router group that performs load balancing of messages to cluster nodes based on cluster metric data.
A router group that performs load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
The configuration parameter trumps the constructor arguments. This means that if you provide
paths
during instantiation they will be ignored if the router is defined in the configuration file for the actor being used.- metricsSelector
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
- paths
string representation of the actor paths of the routees, messages are sent with akka.actor.ActorSelection to these paths
- routerDispatcher
dispatcher to use for the router head actor, which handles router management messages
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
final
case class
AdaptiveLoadBalancingPool
(metricsSelector: MetricsSelector = MixMetricsSelector, nrOfInstances: Int = 0, supervisorStrategy: SupervisorStrategy = Pool.defaultSupervisorStrategy, routerDispatcher: String = Dispatchers.DefaultDispatcherId, usePoolDispatcher: Boolean = false) extends Pool with Product with Serializable
A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.
A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
The configuration parameter trumps the constructor arguments. This means that if you provide
nrOfInstances
during instantiation they will be ignored if the router is defined in the configuration file for the actor being used.Supervision Setup
Any routees that are created by a router will be created as the router's children. The router is therefore also the children's supervisor.
The supervision strategy of the router actor can be configured with #withSupervisorStrategy. If no strategy is provided, routers default to a strategy of “always escalate”. This means that errors are passed up to the router's supervisor for handling.
The router's supervisor will treat the error as an error with the router itself. Therefore a directive to stop or restart will cause the router itself to stop or restart. The router, in turn, will cause its children to stop and restart.
- metricsSelector
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
- nrOfInstances
initial number of routees in the pool
- supervisorStrategy
strategy for supervising the routees, see 'Supervision Setup'
- routerDispatcher
dispatcher to use for the router head actor, which handles supervision, death watch and router management messages
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
final
case class
AdaptiveLoadBalancingRoutingLogic
(system: ActorSystem, metricsSelector: MetricsSelector = MixMetricsSelector) extends RoutingLogic with NoSerializationVerificationNeeded with Product with Serializable
Load balancing of messages to cluster nodes based on cluster metric data.
Load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
- system
the actor system hosting this router
- metricsSelector
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
- Annotations
- @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
abstract
class
CapacityMetricsSelector
extends MetricsSelector
A MetricsSelector producing weights from remaining capacity.
A MetricsSelector producing weights from remaining capacity. The weights are typically proportional to the remaining capacity.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
trait
MetricsSelector
extends Serializable
A MetricsSelector is responsible for producing weights from the node metrics.
A MetricsSelector is responsible for producing weights from the node metrics.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
final
case class
MixMetricsSelector
(selectors: IndexedSeq[CapacityMetricsSelector]) extends MixMetricsSelectorBase with Product with Serializable
MetricsSelector that combines other selectors and aggregates their capacity values.
MetricsSelector that combines other selectors and aggregates their capacity values. By default it uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
abstract
class
MixMetricsSelectorBase
extends CapacityMetricsSelector
Base class for MetricsSelector that combines other selectors and aggregates their capacity.
Base class for MetricsSelector that combines other selectors and aggregates their capacity.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
Value Members
- object ClusterRouterGroupSettings extends Serializable
- object ClusterRouterPoolSettings extends Serializable
Deprecated Value Members
-
object
CpuMetricsSelector
extends CapacityMetricsSelector with Product with Serializable
MetricsSelector that uses the combined CPU metrics.
MetricsSelector that uses the combined CPU metrics. Combined CPU is sum of User + Sys + Nice + Wait, in percentage. Low cpu capacity => small weight.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
object
HeapMetricsSelector
extends CapacityMetricsSelector with Product with Serializable
MetricsSelector that uses the heap metrics.
MetricsSelector that uses the heap metrics. Low heap capacity => small weight.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
object
MetricsSelector
extends Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
object
MixMetricsSelector
extends MixMetricsSelectorBase
Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)
-
object
SystemLoadAverageMetricsSelector
extends CapacityMetricsSelector with Product with Serializable
MetricsSelector that uses the system load average metrics.
MetricsSelector that uses the system load average metrics. System load average is OS-specific average load on the CPUs in the system, for the past 1 minute. The system is possibly nearing a bottleneck if the system load average is nearing number of cpus/cores. Low load average capacity => small weight.
- Annotations
- @SerialVersionUID() @deprecated
- Deprecated
(Since version 2.4) Superseded by akka.cluster.metrics (in akka-cluster-metrics jar)