akka.cluster

routing

package routing

Content Hierarchy Learn more about scaladoc diagrams
Visibility
  1. Public
  2. All

Type Members

  1. 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()
  2. 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()
  3. 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

  4. 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()
  5. 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.RoundRobinRouter or custom routers.

    Annotations
    @SerialVersionUID()
  6. 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 > 0

    totalInstances of cluster router must be > 0

    Annotations
    @SerialVersionUID()
  7. 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.RoundRobinRouter or custom routers.

    Annotations
    @SerialVersionUID()
  8. case class ClusterRouterPoolSettings(totalInstances: Int, maxInstancesPerNode: Int, allowLocalRoutees: Boolean, useRole: Option[String]) extends ClusterRouterSettingsBase with Product with Serializable

    totalInstances of cluster router must be > 0 maxInstancesPerNode of cluster router must be > 0 maxInstancesPerNode of cluster router must be 1 when routeesPath is defined

    totalInstances of cluster router must be > 0 maxInstancesPerNode of cluster router must be > 0 maxInstancesPerNode of cluster router must be 1 when routeesPath is defined

    Annotations
    @SerialVersionUID()
  9. 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()
  10. 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()
  11. 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()
  12. case class AdaptiveLoadBalancingRouter(metricsSelector: MetricsSelector = MixMetricsSelector, nrOfInstances: Int = 0, routees: Iterable[String] = Nil, resizer: Option[Resizer] = None, routerDispatcher: String = Dispatchers.DefaultDispatcherId, supervisorStrategy: SupervisorStrategy = Pool.defaultSupervisorStrategy) extends DeprecatedRouterConfig with PoolOverrideUnsetConfig[AdaptiveLoadBalancingRouter] with Product with Serializable

    A Router that performs load balancing of messages to cluster nodes based on cluster metric data.

    A Router 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.

    Please note that providing both 'nrOfInstances' and 'routees' does not make logical sense as this means that the router should both create new actors and use the 'routees' actor(s). In this case the 'nrOfInstances' will be ignored and the 'routees' will be used.
    The configuration parameter trumps the constructor arguments. This means that if you provide either 'nrOfInstances' or 'routees' 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

    routees

    string representation of the actor paths of the routees that will be looked up using actorFor in akka.actor.ActorRefProvider

    Annotations
    @SerialVersionUID() @deprecated
    Deprecated

    (Since version 2.3) Use AdaptiveLoadBalancingPool or AdaptiveLoadBalancingGroup

  13. final case class ClusterRouterConfig(local: DeprecatedRouterConfig, settings: ClusterRouterSettings) extends DeprecatedRouterConfig with ClusterRouterConfigBase with Product with Serializable

    Annotations
    @deprecated @SerialVersionUID()
    Deprecated

    (Since version 2.3) Use ClusterRouterPool or ClusterRouterGroup

  14. case class ClusterRouterSettings extends ClusterRouterSettingsBase with Product with Serializable

    totalInstances of cluster router must be > 0 maxInstancesPerNode of cluster router must be > 0 maxInstancesPerNode of cluster router must be 1 when routeesPath is defined

    totalInstances of cluster router must be > 0 maxInstancesPerNode of cluster router must be > 0 maxInstancesPerNode of cluster router must be 1 when routeesPath is defined

    Annotations
    @SerialVersionUID() @deprecated
    Deprecated

    (Since version 2.3) Use ClusterRouterPoolSettings or ClusterRouterGroupSettings

Value Members

  1. object ClusterRouterGroupSettings extends Serializable

  2. object ClusterRouterPoolSettings extends Serializable

  3. 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()
  4. 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()
  5. object MetricsSelector extends Serializable

  6. 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()
  7. 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 Value Members

  1. object ClusterRouterSettings extends Serializable

    Annotations
    @deprecated
    Deprecated

    (Since version 2.3) Use ClusterRouterPoolSettings or ClusterRouterGroupSettings

Ungrouped