Membership Membership:
Latest New User Latest: vpros
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 137

People Online People Online:
Visitors Visitors: 23
Members Members: 0
Total Total: 23

NakedMCSE Computer Tech Support Forums

So you have passed all of the exams and you are now out in the real world of windows servers, linux servers and freebsd servers faced with a tech support problem you have never seen before...

Find free online tech support in the forums below, respecting that advice is free, but work beyond advice is not...

The General forum is provided for off topic discussion.

You need a user account to post - please Register or Login.

Online Tech Support Forums
 
  Forum  Open Source Tec...  NGINX Server  Rate Limiting and Limiting connections per IP with NGINX
Previous Previous
 
Next Next
New Post 7/14/2010 7:11 AM
Informative
  Walker
119 posts
www.lairdscomputer.com
10th Level Poster


Rate Limiting and Limiting connections per IP with NGINX 

NGINX has two built in methods for controlling connections to the server.  You can limit the number of connections per IP and you can limit the rate of connections made per client.

To limit the connections per IP, you use the limit_zone configuration:

 limit_zone zone_name $binary_remote_addr 10m;

 server {
    location / {
      limit_conn zone_name 8;  <-- number of connections per IP
    }
  }


To limit the rate of connections per IP, you use the limit_req_zone configuration:

 limit_req_zone $binary_remote_addr zone=zone_name:10m rate=1r/s;  <-- set rate per IP here

 server {
   location / {
     limit_req zone=zone_name burst=5;  <-- set allowable burst rate here
    }
  }


Walker
www.lairdscomputer.com

 
Previous Previous
 
Next Next
  Forum  Open Source Tec...  NGINX Server  Rate Limiting and Limiting connections per IP with NGINX
Send me One Million FREE Guaranteed Visitors