AdaptiveLimiterConfig

data class AdaptiveLimiterConfig(val initialLimit: Int = 20, val minLimit: Int = 1, val maxLimit: Int = 200, val increaseStep: Int = 1, val decreaseFactor: Double = 0.5, val latencyThreshold: Duration? = null)(source)

Configuration for AdaptiveLimiter.

Constructors

Link copied to clipboard
constructor(initialLimit: Int = 20, minLimit: Int = 1, maxLimit: Int = 200, increaseStep: Int = 1, decreaseFactor: Double = 0.5, latencyThreshold: Duration? = null)

Properties

Link copied to clipboard

Multiplicative factor applied to the limit on failure/overload (e.g. 0.5 halves it).

Link copied to clipboard

How much the limit grows after each successful, on-time call.

Link copied to clipboard

Concurrency limit the limiter starts at.

Link copied to clipboard

If a call takes longer than this, it's treated as an overload signal even though it succeeded — mirrors latency-based congestion detection. null disables latency-based back-off.

Link copied to clipboard

Upper bound the limit will never grow above.

Link copied to clipboard

Lower bound the limit will never shrink below.