Limit files download speed of users

Started by Ovrdrv, March 11, 2014, 07:30:59 PM

Previous topic - Next topic

Ovrdrv

Hello.
Thank you for making and supporting SMF.

I have SMF forum with a lot of attachments.
The traffic of people downloading files is more than 20mbit, while my hosting limit is 15mbit.
This cause site to be really slow and not available at times.

I asked about this my hoster, they said that I could try to limit attachments download speed for users.
They said if files are direct links then this is case of changing some nginx server configurations.

But if link is given by forum scripts, those scripts need to be changed to limit download speed of users. I think smf have those php script links, since I see links as:
hxxp:forum.com/index.php?action=dlattach;topic=1.0;attach=1111 [nonactive]

My questions are:

1. How to limit download speeds of users by smf scripts means, since it seems server configuration can't help here?
2. Is it also possible to to set downloads as 1 file at a time for each user?

Thank you very much for any answers/comments.

margarett

For 1): All attachments are served (like everything else in SMF) through index.php. Maybe you can do that if it is possible to impose such limits in file extensions.
For Apache there is at least one extension that allows that:
http://bwmod.sourceforge.net/

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Roph

It's possible to do it purely through PHP, though it's not very efficient memory-wise. And if you're limited to just 15 mbit, I doubt your host is giving you much in the way of other resources.

What host has a 15mbit limit in 2014? 1Gbit/s VPSes can be had for a few dollars a month nowadays. I would recommend you move to a better host.

Ricky.

I will still go with margarett, it will definitely help you but if you have shared hosting, you can't do much.

Advertisement: