
Set Up Rate Limiting with Leaky Bucket Algorithm in Nginx
Nginx came with a rate limit module called ngx_http_limit_req_module, which is quite handy for throttling harmful requests like DoS attack. And the module uses the leaky bucket algorithm to handle the connections, it could allow certain amount of burst requests in a short period of time to suit the use cases.