Commit 225bf5dc authored by zdc's avatar zdc

added request limit, changed command template

* request to server limited to 5 req/min (with burst 20)
* changed command in RouterOS template (/ip route print where [address] in dst-address and active" is slower, but a little bit more satisfied our purposes)
parent 9811ec5f
...@@ -31,5 +31,5 @@ user = "lookis" ...@@ -31,5 +31,5 @@ user = "lookis"
password = "" password = ""
ping_command = "ping count=5" ping_command = "ping count=5"
traceroute_command = "tool traceroute count=1" traceroute_command = "tool traceroute count=1"
showroute_command = "ip route check" showroute_command = "ip route print where"
showroute_command_suffix = "once" showroute_command_suffix = "in dst-address and active"
limit_req_zone $binary_remote_addr zone=lookis_lim:1m rate=5r/m;
upstream lookis_server { upstream lookis_server {
server 127.0.0.1:40080 fail_timeout=0; server 127.0.0.1:40080 fail_timeout=0;
} }
...@@ -8,6 +10,7 @@ server { ...@@ -8,6 +10,7 @@ server {
location / { location / {
proxy_redirect off; proxy_redirect off;
limit_req zone=lookis_lim burst=20 nodelay;
if (!-f $request_filename) { if (!-f $request_filename) {
proxy_pass http://lookis_server; proxy_pass http://lookis_server;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment