Nginx 限流(令牌桶算法)
作者:互联网
# rate=5r/s 每秒增加5个令牌
limit_req_zone $binary_remote_addr zone=req_one:10m rate=5r/s;
location / {
# burst 缓冲区50个链接;超出返回http状态码598
limit_req zone=req_one burst=50 nodelay;
# 设置状态码
limit_req_status 598;
}
标签:令牌,zone,598,req,5r,Nginx,rate,限流,limit 来源: https://blog.csdn.net/yangxingcen/article/details/116296288