Class StabilizingAIMDLimit
java.lang.Object
com.netflix.concurrency.limits.limit.AbstractLimit
io.camunda.zeebe.logstreams.impl.flowcontrol.StabilizingAIMDLimit
- All Implemented Interfaces:
com.netflix.concurrency.limits.Limit
public final class StabilizingAIMDLimit
extends com.netflix.concurrency.limits.limit.AbstractLimit
The limit is calculated purely based on the configured expectedRTT and observed rtt (round trip
time). The algorithm tries to keep the rtts around expectedRTT. It is not guaranteed to be always
less than that. But on an average, rtts will be less than the configured expectedRTT.
The implementation is based on AIMDLimit.
AIMDLimit has a limitation that the limit fluctuates between 1 and 2*X, where X is the optimal
limit for the system. It rarely stabilizes at X. This results in always fluctuating throughput
and latency. StabilizingAIMDLimit fixes this issue, by not reducing the limit if the
inflight is greater than the current limit. As a result it attempts to keep the limit around X.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionprotected int_update(long startTime, long rtt, int inflight, boolean didDrop) static StabilizingAIMDLimit.BuildertoString()Methods inherited from class com.netflix.concurrency.limits.limit.AbstractLimit
getLimit, notifyOnChange, onSample, setLimit