class ClientAdmissionControlParams[A <: Parameterized[A]] extends AnyRef
A collection of methods for configuring the admission control modules of Finagle clients.
- A
a Stack.Parameterized client to configure
- Alphabetic
- By Inheritance
- ClientAdmissionControlParams
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ClientAdmissionControlParams(self: Parameterized[A])
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 maxPendingRequests(requestLimit: Int): A
Configures a limit on the maximum number of outstanding requests per connection.
Configures a limit on the maximum number of outstanding requests per connection. Default is no limit.
- def nackAdmissionControl(window: Duration, threshold: Double): A
Configures the
NackAdmissionFilter
.Configures the
NackAdmissionFilter
. TheNackAdmissionFilter
is enabled by default and configured with the default values which can be found in com.twitter.finagle.filter.NackAdmissionFilter.NOTE: Here is a brief summary of the configurable params.
A configuration with a
threshold
of N% and awindow
of duration W roughly translates as, "start dropping some requests to the cluster when the nack rate averages at least N% over a window of duration W."Here are some examples of situations with param values chosen to make the filter useful:
- Owners of Service A examine their service's nack rate over several days and find that it is almost always under 10% and rarely above 1% (e.g., during traffic spikes) or 5% (e.g., during a data center outage). They do not want to preemptively drop requests unless the cluster sees an extreme overload situation so they choose a nack rate threshold of 20%. And in such a situation they want the filter to act relatively quickly, so they choose a window of 30 seconds.
- Owners of Service B observe that excess load typically causes peak nack rates of around 25% for up to 60 seconds. They want to be aggressive about avoiding cluster overload and don’t mind dropping some innocent requests during mild load so they choose a window of 10 seconds and a threshold of 0.15 (= 15%).
- window
Duration over which to average the ratio of nacked/non-nacked responses.
- threshold
The upper limit of the fraction of responses which are nacks before the
NackAdmissionFilter
begins to drop requests.
- Note
Client-side admission control may not work well with clients that only very sporadically send requests to their backends. In this case, the view that each client has of the state of the backend is reduced drastically, and its efficiency is degraded. It's recommended to disable nack admission control (via noNackAdmissionControl) for clients experiencing bursty and very low volume (i.e., single digit RPS) traffic.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noNackAdmissionControl: A
Disables the
NackAdmissionFilter
if backing off during overload situations is not desirable behavior.Disables the
NackAdmissionFilter
if backing off during overload situations is not desirable behavior. TheNackAdmissionFilter
is enabled by default.Client-side admission control may not work well with clients that only very sporadically send requests to their backends. In this case, the view that each client has of the state of the backend is reduced drastically, and its efficiency is degraded. It's recommended to disable nack admission control for clients experiencing bursty and very low (i.e., single digit RPS) volume traffic.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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()