FAILURE MAP
← Case archive

FA-73500 / Rate limiter algorithms / Member archive

Leaky bucket meter: admission ignores the request cost · case 05

A large request is admitted into an almost full bucket and overflows it.

Member previewVariant 5 · 3 implementations · 6 checks per implementation

Case contract

Input {capacity, leak_per_s, requests [[t_ms, cost]]} with nondecreasing t. The water level drains continuously at leak_per_s units per second (exact rationals) but never below zero; the drain clock advances at every request. A request is admitted iff level + cost <= capacity, raising the level by cost; a denied request leaves the level unchanged. Return [decisions, final level as a fraction string].

Why this case matters

Leaky-bucket meters police sustained rates for network and API traffic; drain and admission rules decide how much burst is tolerated after idleness.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
fill and drain[["allow", "allow", "allow", "deny", "allow"], "499/100"][["allow", "allow", "deny", "allow", "allow"], "399/100"]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 ↗