A thin interface around a Balancer's constructor that allows Finagle to pass in context from the stack to the balancers at construction time.
A thin interface around a Balancer's constructor that allows Finagle to pass in context from the stack to the balancers at construction time.
The user guide for more details.
Balancers for a collection of available balancers.
Constructor methods for various load balancers.
Constructor methods for various load balancers. The methods take balancer specific parameters and return a LoadBalancerFactory that allows you to easily inject a balancer into the Finagle stack via client configuration.
configuring a client with a load balancer
$Protocol.client .withLoadBalancer(Balancers.aperture()) .newClient(...)
The user guide for more details.
Exposes a Stack.Module which composes load balancing into the respective Stack.
Exposes a Stack.Module which composes load balancing into the respective Stack. This is mixed in by default into Finagle's StackClient. The only necessary configuration is a Dest which represents a changing collection of addresses that is load balanced over.
A GlobalFlag that changes the default balancer for every client in the process.
A GlobalFlag that changes the default balancer for every client in the process. Valid choices are ['heap', 'choice', and 'aperture'].
To configure the load balancer on a per-client granularity instead, use the
withLoadBalancer
method like so:
{{ val balancer = Balancers.aperture(...) $Protocol.client.withLoadBalancer(balancer) }}
A GlobalFlag which allows the configuration of per host (or endpoint) stats to be toggled.
A GlobalFlag which allows the configuration of per host (or endpoint) stats to be toggled. Note, these are off by default because they tend to be expensive, especially when the size of the destination cluster is large. However, they can be quite useful for debugging.
This package implements client side load balancing algorithms.
As an end-user, see the Balancers API to create instances which can be used to configure a Finagle client with various load balancing strategies.
As an implementor, each algorithm gets its own subdirectory and is exposed via the Balancers object. Several convenient traits are provided which factor out common behavior and can be mixed in (i.e. Balancer, DistributorT, NodeT, and Updating).