# Nginx and traffic shaping

**URL:** <https://www.ruby-forum.com/t/nginx-and-traffic-shaping/183422>\
**Category:** NGINX\
**Created:** [February 13, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/nginx-and-traffic-shaping/183422 "2010-02-13T18:36:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hibernaculus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@hibernaculus](https://www.ruby-forum.com/u/hibernaculus)\
**Post date:** [February 13, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/nginx-and-traffic-shaping/183422/1 "2010-02-13T18:36:16Z")

</div>

Hi there.

I wanna ask how you guys dealing with traffic shaping with nginx? I  
searching for something like “server.kbytes-per-second” from lighttpd,  
this is “Limit the throughput for all connections to the given limit  
in kbyte/s”.

Thanks.

–  
Piotr K.

---

<div class="post-metadata">

**Author:** ![hibernaculus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/6de8d8/32.png) [@hibernaculus](https://www.ruby-forum.com/u/hibernaculus)\
**Post date:** [February 14, 2010, 3:06am UTC](https://www.ruby-forum.com/t/nginx-and-traffic-shaping/183422/2 "2010-02-14T03:06:00Z")

</div>

Hello!

On Sat, Feb 13, 2010 at 06:35:28PM +0100, Piotr K. wrote:

> I wanna ask how you guys dealing with traffic shaping with nginx? I  
> searching for something like “server.kbytes-per-second” from lighttpd,  
> this is “Limit the throughput for all connections to the given limit  
> in kbyte/s”.

In nginx you may limit individual request bandwidth usage via  
limit\_rate directive. It is believed that aggregate limits may be  
(and should be) done at network level if required (i.e. via your  
favorite firewall / traffic shaper).

Maxim D.
