object LoadBalancerFactory
Exposes a Stack.Module which composes load balancing into the respective Stack. This is mixed in by default into Finagle's com.twitter.finagle.client.StackClient. The only necessary configuration is a LoadBalancerFactory.Dest which represents a changing collection of addresses that is load balanced over.
- Alphabetic
- By Inheritance
- LoadBalancerFactory
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class AddressFormatter(formatter: (Address) => String) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory address formatter for per host com.twitter.finagle.stats.StatsReceiver scope.
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory address formatter for per host com.twitter.finagle.stats.StatsReceiver scope. Default com.twitter.finagle.loadbalancer.LoadBalancerFactory.AddressFormatter.ByHostName.
- case class AddressOrdering(ordering: Ordering[Address]) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory with a finagle Address ordering.
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory with a finagle Address ordering. The collection of endpoints in a load balancer are sorted by this ordering. Although it's generally not a good idea to have the same ordering across process boundaries, the final ordering decision is left to the load balancer implementations. This only provides a stable ordering before we hand off the collection of endpoints to the balancer.
- case class Dest(va: Var[Addr]) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory with a collection of addrs to load balance.
- case class EnableProbation(enable: Boolean) extends Product with Serializable
A class eligible for configuring a client's load balancer probation setting.
A class eligible for configuring a client's load balancer probation setting. When enabled, the balancer treats removals as advisory and flags them. If a a flagged endpoint is also detected as unhealthy by Finagle's session qualifiers (e.g. fail-fast, failure accrual, etc) then the host is removed from the collection.
- case class ErrorLabel(label: String) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory with a label for use in error messages.
- case class HostStats(hostStatsReceiver: StatsReceiver) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory per host com.twitter.finagle.stats.StatsReceiver.
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory per host com.twitter.finagle.stats.StatsReceiver. If the per-host StatsReceiver is not null, the load balancer will broadcast stats to it (scoped with the "host:port" pair) for each host in the destination. For clients with a large host sets in their destination, this can cause unmanageable memory pressure.
- sealed abstract class PanicMode extends AnyRef
- case class Param(loadBalancerFactory: LoadBalancerFactory) extends Product with Serializable
A class eligible for configuring a com.twitter.finagle.Stackable com.twitter.finagle.loadbalancer.LoadBalancerFactory.
- case class ReplicateAddresses(count: Int) extends Product with Serializable
A class eligible for configuring the way endpoints are created for a load balancer.
A class eligible for configuring the way endpoints are created for a load balancer. In particular, each endpoint that is resolved is replicated by the given parameter. This increases concurrency for each identical endpoint and allows them to be load balanced over. This is useful for pipelining or multiplexing protocols that may incur head-of-line blocking (e.g. from the server's processing threads or the network) without this replication.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def module[Req, Rep]: Stackable[ServiceFactory[Req, Rep]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val role: Role
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object AddressFormatter extends Serializable
- object AddressOrdering extends Serializable
- object Dest extends Serializable
- implicit object EnableProbation extends Stack.Param[EnableProbation] with Serializable
- object ErrorLabel extends Serializable
- object HostStats extends Serializable
- object PanicMode
Panic mode is when the LB gives up trying to find a healthy node.
Panic mode is when the LB gives up trying to find a healthy node. The LB sends the request to the last pick even if the node is unhealthy. For a given request, panic mode is enabled when the percent of nodes that are unhealthy exceeds the panic threshold. This percent is approximate. For pick2-based load balancers (P2C* and Aperture*), interpret this as 1% of requests or less will panic when the threshold is reached. When the percent of unhealthy nodes exceeds the threshold, the number of requests that panic increases exponentially. For round robin, this panic threshold percent does not apply because it is not a pick two based algorithm. Panic mode is disabled for heap LB.
Please, note that this doesn't mean that 1% of requests will fail since Finagle clients have additional layers of requeues above the load balancer.
- object Param extends Serializable
- object ReplicateAddresses extends Serializable