com.twitter.finagle.loadbalancer

Balancers

Related Doc: package loadbalancer

object 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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Balancers
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val MaxEffort: Int

    Default MaxEffort used in constructors below.

  5. def aperture(smoothWin: Duration = 5.seconds, lowLoad: Double = 0.5, highLoad: Double = 2, minAperture: Int = 1, timer: Timer = DefaultTimer.twitter, maxEffort: Int = MaxEffort, rng: Rng = Rng.threadLocal): LoadBalancerFactory

    The aperture load-band balancer balances load to the smallest subset ("aperture") of services so that:

    The aperture load-band balancer balances load to the smallest subset ("aperture") of services so that:

    1. The concurrent load, measured over a window specified by smoothWin, to each service stays within the load band, delimited by lowLoad and highLoad. 2. Services receive load proportional to the ratio of their weights.

    Unavailable services are not counted--the aperture expands as needed to cover those that are available.

  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. def heap(rng: Random = new Random): LoadBalancerFactory

    An efficient strictly least-loaded balancer that maintains an internal heap.

    An efficient strictly least-loaded balancer that maintains an internal heap. Note, because weights are not supported by the HeapBalancer they are ignored when the balancer is constructed.

  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. def p2c(maxEffort: Int = MaxEffort, rng: Rng = Rng.threadLocal): LoadBalancerFactory

    An O(1), concurrent, weighted least-loaded fair load balancer.

    An O(1), concurrent, weighted least-loaded fair load balancer. This uses the ideas behind "power of 2 choices" [1] combined with O(1) biased coin flipping through the aliasing method, described in Drv.

    maxEffort

    the maximum amount of "effort" we're willing to expend on a load balancing decision without reweighing.

    rng

    The PRNG used for flipping coins. Override for deterministic tests.

    [1] Michael Mitzenmacher. 2001. The Power of Two Choices in Randomized Load Balancing. IEEE Trans. Parallel Distrib. Syst. 12, 10 (October 2001), 1094-1104.

  19. def p2cPeakEwma(decayTime: Duration = 10.seconds, maxEffort: Int = MaxEffort, rng: Rng = Rng.threadLocal): LoadBalancerFactory

    Like p2c but using the Peak EWMA load metric.

    Like p2c but using the Peak EWMA load metric.

    Peak EWMA uses a moving average over an endpoint's round-trip time (RTT) that is highly sensitive to peaks. This average is then weighted by the number of outstanding requests, effectively increasing our resolution per-request. It is designed to react to slow endpoints more quickly than least-loaded by penalizing them when they exhibit slow response times. This load metric operates under the assumption that a loaded endpoint takes time to recover and so it is generally safe for the advertised load to incorporate an endpoint's history. However, this assumption breaks down in the presence of long polling clients.

    decayTime

    The window of latency observations.

    maxEffort

    the maximum amount of "effort" we're willing to expend on a load balancing decision without reweighing.

    rng

    The PRNG used for flipping coins. Override for deterministic tests.

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped