nginx current limiting algorithm

WBOY
Release: 2016-07-28 08:29:16
Original
1669 people have browsed it

nginx current limiting mainly includes the limit_conn module and the limit_req module

limit_conn limits the number of connections, and limit_req limits the request rate

limit_conn limits the current

http {

limit_conn_zone $binary_remote_addr z/p>

limit_conn_log_level error;

limit_conn_status 503;

server {

...

location /{

limit_conn addr 2

}

limit_req limit_req_zone $binary_remote_addr z rate= 5r/s;

limit_req_log_level error;

limit_req_status 503;


server {

...

location /{

limit_req z burst=3;

}


}

The above has introduced the nginx current limiting algorithm, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!