0
http {
    #...

    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;

    server {
        #...

        location /search/ {
            limit_req zone=one burst=5;
        }
    }
}

With this configuration, if request rate exceeds 1 request per second, requests beyond the rate will be put into the zone one. When the zone is full, excessive requests will be queued (burst), the size of this queue is 5 requests. Request processing in the queue is delayed in such a way that the overall rate is not greater than specified. Requests above the burst limit will be rejected with the 503 error.

Link: https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-http/

My understanding is that - if request rate exceeds 1 request per second, requests beyond the rate will be put into the queue. Where as the above quote from the link says that "if request rate exceeds 1 request per second, requests beyond the rate will be put into the zone one". Is the above quote from the link correct?

variable
  • 137
  • 7

0 Answers0