Session review
Rate limiter in production
- Language
- Python
- Time used
- 68 of 75 min
Test results
4 of 5 passed, including hidden tests
- ✓test_traffic_pattern
- ✓test_denied_not_countedhidden
- ✓test_history_pruninghidden
- ✓test_instance_isolationhidden
- ✕test_boundaryhidden
What went well
- Went from the support ticket to the exact line in under ten minutes, and said out loud why raising
window_secondswouldn't help.
What to improve
- A request exactly
window_secondsold still counts against the user. Ask which side of the boundary is inclusive before choosing<=.
How a strong solution would approach it
Reproduce each ticket as a failing test first, then fix the three causes separately: stop recording denied requests, prune history outside the window, and give each limiter its own dictionary.