Skip to content

Commit ac9aeb7

Browse files
committed
Add queueing on webserver level
1 parent 32139b6 commit ac9aeb7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

nginx.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ http {
1818
gzip_min_length 256;
1919
gzip_comp_level 6;
2020

21+
limit_req_zone $server_name zone=peppol_ratelimit:10m rate=4r/s;
22+
2123
server {
2224
listen 8000;
2325

@@ -53,6 +55,7 @@ http {
5355
proxy_cache_bypass $http_pragma; # Allow manual bypass for debugging
5456

5557
location / {
58+
limit_req zone=peppol_ratelimit burst=128; # This will queue 128 requests.
5659
proxy_pass https://directory.peppol.eu/search/1.0/json;
5760
add_header X-Cache-Status $upstream_cache_status;
5861
add_header X-Cache-Key $normalized_cache_key;

0 commit comments

Comments
 (0)