久久青草精品A片狠狠,日韩欧美视频一区二区,亚洲国码AV日韩,国产精品黄在

Nginx控制并發(fā)連接

2016-08-27 15:09:27 9131

你可以使用NginxHttpLimitZone模塊來限制指定的會話或者一個IP地址的特殊情況下的并發(fā)連接。編輯nginx.conf:

  1. ### Directive describes the zone, in which the session states are stored i.e. store in slimits. ###

  2. ### 1m can handle 32000 sessions with 32 bytes/session, set to 5m x 32000 session ###

  3. limit_zone slimits $binary_remote_addr 5m;

  4. ### Control maximum number of simultaneous connections for one session i.e. ###

  5. ### restricts the amount of connections from a single ip address ###

  6. limit_conn slimits 5;

上面表示限制每個遠程IP地址的客戶端同時打開連接不能超過5個。

 



提交成功!非常感謝您的反饋,我們會繼續(xù)努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務,我們很需要您進一步的反饋信息:

在文檔使用中是否遇到以下問題: