views:

18

answers:

2

My website allows users to upload their photos

Can I put kb/sec (or similar) limit on uploads to prevent them impacting performance of the frontend of my site?

A: 

If you experience such strong performance impact, you should split your website onto multiple servers, one that delivers read-only content and the other one that is used when the user interacts by uploading files or doing database updates.

cweiske
Yes I am aware of this, i thought it would be worth checking there are no params in apache's conf file or php.ini... We are not experiencing any performance impacts
Haroldo
See http://ask.slashdot.org/article.pl?sid=02/07/18/0231229 for the same question (rate limiting is the keyword here).
cweiske
A: 

Slowing down the upload (or download) bandwidth will actually make the impact elsewhere worse - not better until you actually get to the point where all your incoming bandwidth is used up.

Before you seize on the caveat I've just given - this is a very unusual scenario for a webserver. Go measure your bandwidth usage in and out first.

If the very remote possibility that your incoming bandwidth is completely hogged by uploading then you really need to stop people from uploading som much - not slow them down so that the process hogs memory, CPU and processes for longer.

It is usually a good idea to limit the connection rate (not bandwidth) per client address to protect against DOS attacks - but this is better done at the perimeter of your network rather than on the server itself.

symcbean
Thanks, this is very interesting
Haroldo