Rate limiter could implmented by each API/ each IP/ total region Might save the rule in DB / config file
Where to implement
- server side
- Fully control
- middleware
- API gateway
- Might be 3rd party
Algorithm
- Token bucket
- Leaking bucket
- Fixed window counter
- sliding window log
- Sliding window counter
Resource
- Good video
- Need to review again to get deeper
- Code for TokenBucket
- 九章算法