# Limit\_conn with zones -- safe production server value?

**URL:** <https://www.ruby-forum.com/t/limit-conn-with-zones-safe-production-server-value/207603>\
**Category:** NGINX\
**Created:** [May 29, 2011, 6:08pm UTC](https://www.ruby-forum.com/t/limit-conn-with-zones-safe-production-server-value/207603 "2011-05-29T18:08:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [May 29, 2011, 6:08pm UTC](https://www.ruby-forum.com/t/limit-conn-with-zones-safe-production-server-value/207603/1 "2011-05-29T18:08:18Z")

</div>

Hi. I am trying to replicate the functionality of mod\_evasive on Apache,  
which basically says that at the same point the same IP can have only “X  
connections per second”.

I see the example here:  
[http://wiki.nginx.org/HttpLimitZoneModule](http://wiki.nginx.org/HttpLimitZoneModule)

But this uses “binary\_remote\_addr”. How does this cater for shared IPs,  
where people in the same network may actually have the same remote addr.

Can I therefore use some other variable, such as a combination of  
“binary\_remote\_addr” and their “http\_user\_agent”?

What is the most often used value in production environments?

Thanks!

Posted at Nginx Forum:

> **[Limit\_conn with zones -- safe production server value?](https://forum.nginx.org/read.php?2,202012,202012#msg-202012)**
>
> Hi. I am trying to replicate the functionality of mod\_evasive on Apache, which basically says that at the same point the same IP can have only "X connections per second". I see the example here: http://wiki.nginx.org/HttpLimitZoneModule But...
