Throttling uploads (incoming) traffic to nginx


I asked a similar question but no one answered and we keep failing when
trying too, so I’m trying to ask again.

Our organization is testing nginx,

We noticed that the limit_rate directive works for data sent out from
server very well (downloads),

But absolutely no limit seems to be set for the data sent into the

Is there any way to allow a limit_rate for uploads too? And if not,
this be considered a bug to be fixed?

We handle large uploads, and Upload Module seems perfect, but the
uploads go
at 100% full speed which we want too slow down due to server load/file
system load.



No, currently it’s impossible with upload module. And I guess without as

Does it really sound like a big problem? If it is reasonable, I’ll
include it into my TODO list.


I think it’s important, because on gigabat LAN, if you upload a large
the server file system goes up way high and is impractical. File system
writes are much more severe on performance than writes.

Also for users on high speed internet we’ve seen uploads of up to 8
Megabytes/sec which causes massive file system load, and noticably slow
the whole server.
Lastly it would be helpful to block massive DOS attacks that upload
files and cause file system load which our organization has actual have

Have a nice day.
On Tue, Jan 13, 2009 at 6:15 PM, Valery K. <



Patch in attachment for upload module 2.0.8 introduces directive
upload_limit_rate and implements upload rate limiting.

Currently I’m in real doubts whether to include it in 2.0.9 or not,
since I’m working on input filter chain for nginx and implementing rate
limits in it will cover larger set of problems.

Example configuration:

location = /upload {
upload_pass @a;


 # Limit upload rate to 256k per sec
 upload_limit_rate 256k;


The implementation is based on the output rate limiting code, which is
credited to Igor S…