pub struct Aimd { /* private fields */ }Expand description
AIMD (Additive Increase / Multiplicative Decrease) concurrency limit strategy.
A loss-based algorithm that increases the limit by a fixed amount on success and multiplies it by a backoff ratio on error or timeout. This is the same approach used in TCP Reno congestion control.
Unlike Vegas, AIMD does not track baseline RTT or
estimate queue depth — it reacts purely to errors and timeouts, making it
simpler but less proactive.
§Differences from Netflix’s Java implementation
The Java reference truncates the limit to an integer after every update,
while this implementation keeps it as an f64 internally. This means
repeated backoffs decay more smoothly (e.g. 10.0 → 9.0 → 8.1 → 7.29
instead of 10 → 9 → 8 → 7). The observable limit (via
max_concurrency) is the same in most
cases, but after recovery the internal state may be slightly higher than
the Java equivalent, leading to marginally faster ramp-up.