Interview Prep/Networking/Load Balancers, Proxies & CDNs

What is rate limiting and where should it live?

AdvancedConceptLoad Balancers, Proxies & CDNs
Answer

Controlling request rate per client key to protect backends and ensure fairness. Algorithms: token bucket, leaky bucket, fixed and sliding window. Respond with 429 and Retry-After.

Layers: CDN/WAF for coarse abuse, API gateway or ingress for per-API-key quotas, application for business rules. nginx: limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s; plus limit_req zone=api burst=20 nodelay;.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs