Token Bucket Visualization
Tokens refill smoothly over time. Allows sudden bursts up to capacity, then throttles to steady refill rate.
Accepted25
Throttled (429)55
Pass Rate31.3%
Recent Request Execution Timeline (80 requests)Green = 200 OK • Red = 429 Throttled
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✗
✓
✗
✗
✗
✗
✗
✓
✗
✗
✗
✗
✗
✓
✗
Head-to-Head Algorithm Comparison Under Identical Workload
Input: 80 requests (flash_burst)| Algorithm | Accepted | Throttled | Pass Rate | Boundary Spike Immunity | Memory Footprint | Time Complexity |
|---|---|---|---|---|---|---|
| Token Bucket | 25 | 55 | 31.3% | Immune (Smooth) | 24 B (O(1) constant) | O(1) Constant |
| Leaky Bucket | 25 | 55 | 31.3% | Immune (Smooth) | 24 B (O(1) constant) | O(1) Constant |
| Fixed Window | 20 | 60 | 25% | Immune (Smooth) | 16 B (O(1) constant) | O(1) Constant |
| Sliding Window Log | 20 | 60 | 25% | Immune (Smooth) | 1440 B (O(N) scale) | O(log N) / O(N) |
| Sliding Window Counter | 20 | 60 | 25% | Immune (Smooth) | 24 B (O(1) constant) | O(1) Constant |