Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 450 Bytes

RateLimiter.md

File metadata and controls

9 lines (7 loc) · 450 Bytes

Rate Limiter

Protect servers from overload, enhance stability and strength security by preventing malicious attack (DDoS)

  • User based: limit the number of creating short url by user
  • IP based: limit the number of resolving url by IP (DDoS)
  • Token bucket algorithm: easy to implement, enable handle steady traffic and traffic spike
  • 429 Too Many Requests: block or delay requests
  • Redis: count request using INCR, reset count using EXPIRE