ox.resilience.RateLimiterAlgorithm
See theRateLimiterAlgorithm companion trait
object RateLimiterAlgorithm
Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RateLimiterAlgorithm.type
Members list
Type members
Classlikes
case class FixedWindow(rate: Int, per: FiniteDuration) extends RateLimiterAlgorithm
Fixed window algorithm: allows starting at most rate
operations in consecutively segments of duration per
.
Fixed window algorithm: allows starting at most rate
operations in consecutively segments of duration per
.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait RateLimiterAlgorithmclass Objecttrait Matchableclass AnyShow all
case class LeakyBucket(rate: Int, per: FiniteDuration) extends RateLimiterAlgorithm
Token/leaky bucket algorithm It adds a token to start an new operation each per
with a maximum number of tokens of rate
.
Token/leaky bucket algorithm It adds a token to start an new operation each per
with a maximum number of tokens of rate
.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait RateLimiterAlgorithmclass Objecttrait Matchableclass AnyShow all
case class SlidingWindow(rate: Int, per: FiniteDuration) extends RateLimiterAlgorithm
Sliding window algorithm: allows to start at most rate
operations in the lapse of per
before current time.
Sliding window algorithm: allows to start at most rate
operations in the lapse of per
before current time.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait RateLimiterAlgorithmclass Objecttrait Matchableclass AnyShow all
In this article