# NGINX Rate Limit, Burst and nodelay( please read other related post for in-depth understanding))

**URL:** <https://forum.hhf.technology/t/nginx-rate-limit-burst-and-nodelay-please-read-other-related-post-for-in-depth-understanding/169>\
**Category:** Resources\
**Tags:** nginx\
**Created:** [October 11, 2024, 3:09am UTC](https://forum.hhf.technology/t/nginx-rate-limit-burst-and-nodelay-please-read-other-related-post-for-in-depth-understanding/169 "2024-10-11T03:09:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhf.technoloy](https://forum.hhf.technology/user_avatar/forum.hhf.technology/hhf.technoloy/32/68_2.png) [@hhf.technoloy](https://forum.hhf.technology/u/hhf.technoloy)\
**Post date:** [October 11, 2024, 3:09am UTC](https://forum.hhf.technology/t/nginx-rate-limit-burst-and-nodelay-please-read-other-related-post-for-in-depth-understanding/169/1 "2024-10-11T03:09:37Z")

</div>

```nginx
## https://nginx.org/en/docs/http/ngx_http_limit_req_module.html
## https://www.nginx.com/blog/rate-limiting-nginx
## Ref. https://github.com/sportebois/nginx-rate-limit-sandbox

limit_req_zone $request_uri zone=by_uri:10m rate=30r/m;
limit_req_zone $binary_remote_addr zone=by_ip:10m rate=30r/m;

server {
    listen 80;

    location /by-uri/burst0 {
        limit_req zone=by_uri;
        try_files $uri /index.html;
    }

    location /by-uri/burst0_nodelay {
        limit_req zone=by_uri nodelay;
        try_files $uri /index.html;
    }

    location /by-uri/burst5 {
        limit_req zone=by_uri burst=5;
        try_files $uri /index.html;
    }

    location /by-uri/burst5_nodelay {
        limit_req zone=by_uri burst=5 nodelay;
        try_files $uri /index.html;
    }

    # Same logic, but in the other rate-rimit zone

    location /by-ip/burst0 {
        limit_req zone=by_ip;
        try_files $uri /index.html;
    }

    location /by-ip/burst0_nodelay {
        limit_req zone=by_ip nodelay;
        try_files $uri /index.html;
    }

    location /by-ip/burst5 {
        limit_req zone=by_ip burst=5;
        try_files $uri /index.html;
    }

    location /by-ip/burst5_nodelay {
        limit_req zone=by_ip burst=5 nodelay;
        try_files $uri /index.html;
    }
}

```
