Sliding window counter.
also: sliding-window counterWeighting the previous fixed window's count by how much it overlaps the sliding window, then adding the current count.
the two-minute refresher
- Weighted count = previous × overlap% + current, for example 8 × 75% + 3 = 9.
- Two counters per key: low memory, good accuracy.
- The lesson's default recommendation for API rate limits.