Search Results for

    Show / Hide Table of Contents

    Class AdaptiveLoadBalancingGroup

    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.

    Inheritance
    object
    RouterConfig
    Group
    AdaptiveLoadBalancingGroup
    Implements
    ISurrogated
    IEquatable<RouterConfig>
    IEquatable<Group>
    Inherited Members
    Group.Props()
    Group.CreateRouterActor()
    Group.Equals(Group)
    Group.Equals(object)
    Group.GetHashCode()
    RouterConfig.RouterDispatcher
    RouterConfig.IsManagementMessage(object)
    RouterConfig.StopRouterWhenAllRouteesRemoved
    RouterConfig.WithFallback(RouterConfig)
    RouterConfig.VerifyConfig(ActorPath)
    RouterConfig.Equals(RouterConfig)
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Cluster.Metrics
    Assembly: Akka.Cluster.Metrics.dll
    Syntax
    public sealed class AdaptiveLoadBalancingGroup : Group, ISurrogated, IEquatable<RouterConfig>, IEquatable<Group>

    Constructors

    | Edit this page View Source

    AdaptiveLoadBalancingGroup(IMetricsSelector, IEnumerable<string>, string)

    Creates new instance of AdaptiveLoadBalancingGroup from provided configuration

    Declaration
    public AdaptiveLoadBalancingGroup(IMetricsSelector metricsSelector = null, IEnumerable<string> paths = null, string routerDispatcher = null)
    Parameters
    Type Name Description
    IMetricsSelector metricsSelector

    Decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics

    IEnumerable<string> paths

    String representation of the actor paths of the routees, messages are sent with ActorSelection to these paths

    string routerDispatcher

    Dispatcher to use for the router head actor, which handles router management messages

    | Edit this page View Source

    AdaptiveLoadBalancingGroup(Config)

    Creates new instance of AdaptiveLoadBalancingGroup from provided configuration

    Declaration
    public AdaptiveLoadBalancingGroup(Config config)
    Parameters
    Type Name Description
    Config config

    Methods

    | Edit this page View Source

    CreateRouter(ActorSystem)

    Creates a router that is responsible for routing messages to routees within the provided system.

    Declaration
    public override Router CreateRouter(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The ActorSystem this router belongs to.

    Returns
    Type Description
    Router

    The newly created router tied to the given system.

    Overrides
    RouterConfig.CreateRouter(ActorSystem)
    | Edit this page View Source

    GetPaths(ActorSystem)

    Retrieves the actor paths used by this router during routee selection.

    Declaration
    public override IEnumerable<string> GetPaths(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system that owns this router.

    Returns
    Type Description
    IEnumerable<string>

    An enumeration of actor paths used during routee selection

    Overrides
    Group.GetPaths(ActorSystem)
    | Edit this page View Source

    RoutingLogicController(RoutingLogic)

    Possibility to define an actor for controlling the routing logic from external stimuli(e.g.monitoring metrics). This actor will be a child of the router "head" actor. Management messages not handled by the "head" actor are delegated to this controller actor.

    Declaration
    public override Props RoutingLogicController(RoutingLogic routingLogic)
    Parameters
    Type Name Description
    RoutingLogic routingLogic
    Returns
    Type Description
    Props
    Overrides
    RouterConfig.RoutingLogicController(RoutingLogic)
    | Edit this page View Source

    ToSurrogate(ActorSystem)

    Creates a surrogate representation of the current router.

    Declaration
    public override ISurrogate ToSurrogate(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system that owns this router.

    Returns
    Type Description
    ISurrogate

    The surrogate representation of the current router.

    Overrides
    RouterConfig.ToSurrogate(ActorSystem)
    | Edit this page View Source

    WithDispatcher(string)

    Setting the dispatcher to be used for the router head actor, which handles router management messages

    Declaration
    public AdaptiveLoadBalancingGroup WithDispatcher(string dispatcherId)
    Parameters
    Type Name Description
    string dispatcherId
    Returns
    Type Description
    AdaptiveLoadBalancingGroup

    Implements

    ISurrogated
    IEquatable<T>
    IEquatable<T>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET