From a5b76597a01fe81a9db1adf12d72ba7ebdea8d5a Mon Sep 17 00:00:00 2001 From: Mathijs de Bruin Date: Sat, 10 Dec 2022 22:31:36 +0000 Subject: [PATCH] Temporarily disable request and connection limits. --- roles/services/frontend/templates/nginx-frontend.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/services/frontend/templates/nginx-frontend.conf.j2 b/roles/services/frontend/templates/nginx-frontend.conf.j2 index 1cc4bf4..8a09f9f 100644 --- a/roles/services/frontend/templates/nginx-frontend.conf.j2 +++ b/roles/services/frontend/templates/nginx-frontend.conf.j2 @@ -13,6 +13,8 @@ proxy_cache_path {{ frontend_cache_path }}/thumbnail levels=1:2 keys_zone=thumbn # Allow hole-punching in proxy with `?nocache=true`. proxy_cache_bypass $cookie_nocache $arg_nocache; +# TODO: Whitelist for load testing. +# https://gadelkareem.com/2012/03/25/limit-requests-per-ip-on-nginx-using-httplimitzonemodule-and-httplimitreqmodule-except-whitelist/ limit_req_zone $binary_remote_addr zone=search_reqs:10m rate=200r/s; limit_conn_zone $binary_remote_addr zone=search_conns:10m; @@ -83,8 +85,8 @@ server { server_name {{ api_server_name }}; - limit_req zone=search_reqs burst=300; - limit_conn search_conns 200; # Concurrent requests per client IP. + # limit_req zone=search_reqs burst=300; + # limit_conn search_conns 200; # Concurrent requests per client IP. location / { return 301 https://app.swaggerhub.com/apis-docs/ipfs-search/ipfs-search;