FA-73569 / Rate limiter algorithms / Member archive
AIMD adaptive concurrency limit: successes do not count down the cooldown · case 04
After one loss the limiter ignores later losses until more losses arrive, reacting too slowly.
Case contract
Input {initial, min, max, cooldown, events}. The limit is kept in fixed-point thousandths (integer). "ok" adds floor(10^6 / limit_thousandths), i.e. 1/limit, capped at max, and counts down an active cooldown. "drop" or "timeout" halves the limit (floor), floored at min, and starts a cooldown of the given number of events when no cooldown is active; during a cooldown a loss only counts it down. After each event report floor(limit). Return [reported whole limits, final limit in thousandths].
Why this case matters
Adaptive concurrency limiters (AIMD, as in TCP congestion control) protect overloaded backends; step sizes, bounds and cooldowns decide whether the limit converges or oscillates.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| cooldown counts successes | [[8, 8, 8, 8, 8, 8, 8, 8, 8, 8], 8835] | [[8, 8, 8, 4, 4, 4, 4, 4, 5, 5], 5218] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗