Session review
Rate limiter in production
- Language
- Python
- Time used
- 52 of 60 min
Test results
3 of 4 passed, including hidden tests
- ✓test_traffic_pattern
- ✓test_denied_not_countedhidden
- ✓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: let a request expire exactly at the window edge, stop recording denied requests, and give each limiter its own dictionary.