I chose tengine between nginx and tengine. tengine Taobao nginx company in research and development. Nginx also tested in some of the function is not very good. such as:
Limiting this, nginx currently only supports limiting ip
There detection aspects of the back-end servers are not as tengine
A switch network version: switching network / 2.3.1
nginx version: nginx / 1.16.0
Module say today:
limit_req_zone can support iIP address based URL, and the URL limiting parameter combinations
Defined in the global configuration
limit_req_zone $ binary_remote_addr zone = rate_ip: 50m rate = 1r / s; # for a second IP flow restrictor
limit_req_zone $ args zone = user: 50m rate = 3r / s; # based URL parameter limiting
limit_req_zone $ binary_remote_addr $ args zone = ip_user : 50m rate = 2r / s; # based ip + parameter limiting
limit_req_zone $ binary_remote_addr $ request_uri zone = ip_url : 50m rate = 1r / s; + URL based on the IP
limit_req_zone $ args = high_cpu Zone: 5R = Rate 50m / m; # URL parameter based on flow restrictor
Quoted in the local configuration file
location / {
limit_req zone=rate_ip burst=2 delay=1;
increase the number of burst parameters funnel, a restriction is originally a second IP request, burst now added, can be achieved three requests per second, into the queue behind the two.
delay = 1, represents: burst which does not require a queue.