# Mod\_zip and limit\_rate

**URL:** <https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285>\
**Category:** NGINX\
**Created:** [April 26, 2012, 6:09pm UTC](https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285 "2012-04-26T18:09:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [April 26, 2012, 6:09pm UTC](https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285/1 "2012-04-26T18:09:55Z")

</div>

Hi,

I’ve setup nginx (1.0.14) with mod\_zip (1.1.6) and it runs fine “by  
itself”.

The problem is that limit\_rate and limit\_rate\_after directives (in the  
location where the files are being  
served from) are not respected.

I can download at full throttle while when not using mod\_zip they work.

Anyone has encountered this issue, any workarounds?

Thanks  
Stelios

Posted at Nginx Forum:

> **[mod\_zip and limit\_rate](https://forum.nginx.org/read.php?2,225839,225839#msg-225839)**
>
> Hi, I've setup nginx (1.0.14) with mod\_zip (1.1.6) and it runs fine "by itself". The problem is that limit\_rate and limit\_rate\_after directives (in the location where the files are being served from) are not respected. I can download at f

---

<div class="post-metadata">

**Author:** ![stelios](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@stelios](https://www.ruby-forum.com/u/stelios)\
**Post date:** [May 9, 2012, 1:29pm UTC](https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285/2 "2012-05-09T13:29:06Z")

</div>

Ignore this msg. mod\_zip works fine.

The problem was limit\_rate\_after that I’ve put in at some point, so I  
didn’t download a large enough file to see the limit\_rate kick in.

Posted at Nginx Forum:

> **[Re: mod\_zip and limit\_rate](https://forum.nginx.org/read.php?2,225839,226208#msg-226208)**
>
> Hi, I've setup nginx (1.0.14) with mod\_zip (1.1.6) and it runs fine "by itself". The problem is that limit\_rate and limit\_rate\_after directives (in the location where the files are being served from) are not respected. I can download at f

---

<div class="post-metadata">

**Author:** ![stelios](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@stelios](https://www.ruby-forum.com/u/stelios)\
**Post date:** [May 9, 2012, 3:25pm UTC](https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285/3 "2012-05-09T15:25:50Z")

</div>

On 9 May 2012 12:28, stelios [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Ignore this msg. mod\_zip works fine.
> 
> The problem was limit\_rate\_after that I’ve put in at some point, so I  
> didn’t download a large enough file to see the limit\_rate kick in.

Just out of interest, does this combination of directives rate limit  
before or after the stream is zipped?

## Jonathan

Jonathan M.  
Oxford, London, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**

---

<div class="post-metadata">

**Author:** ![stelios](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@stelios](https://www.ruby-forum.com/u/stelios)\
**Post date:** [May 10, 2012, 12:17pm UTC](https://www.ruby-forum.com/t/mod-zip-and-limit-rate/219285/4 "2012-05-10T12:17:32Z")

</div>

Hello!

On Wed, May 09, 2012 at 02:25:10PM +0100, Jonathan M. wrote:

> On 9 May 2012 12:28, stelios [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Ignore this msg. mod\_zip works fine.
> > 
> > The problem was limit\_rate\_after that I’ve put in at some point, so I  
> > didn’t download a large enough file to see the limit\_rate kick in.
> 
> Just out of interest, does this combination of directives rate limit  
> before or after the stream is zipped?

Directives limit\_rate/limit\_rate\_after count (and limit) actual  
bytes sent to a client, i.e. after the stream is zipped (or  
gzipped, or whatever else).

Maxim D.
