|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Sep 1999
Messaggi: 358
|
Limitare la banda su server web Debian
Ciao a tutti,
ho realizzato un serverino web + php + mysql su distribuzione Debian 4 etch. Sfruttando cosi' la nostra linea internet a 4 mega shdsl, per ospitare il nostro sito web. Sul sito ci sono dei file che i nostri clienti possono scaricare via http. Ma quando questo avviene non riusciamo piu' neanche a navigare, in quanto vengono utilizzati tutti i 4 mega. Non posso purtroppo usare ftp, sono costretto a farlo in http, in quanto bisognerebbe far rifare il sito. C'e' un modo per limitare, (magari a livello di scheda di rete) la banda ? Si potrebbe usare qualche software, oppure è necessario un hw particolare ? Grazie a tutti del prezioso aiuto.
__________________
-- La via del saggio è buia, ma la meta è splendente -- |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Sep 1999
Messaggi: 358
|
Chiedo scusa non avevo visto questo ottimo post :
http://www.hwupgrade.it/forum/showth...limitare+banda Comunque se avete altri suggerimenti... Altrimenti si puo' anche chiudere sto post ![]()
__________________
-- La via del saggio è buia, ma la meta è splendente -- |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
come hai indicato puoi effettuare traffic shaping sull'interfaccia di rete sulla quale esponi il servizio web.
un'alternativa è data da gestire invece la limitazione della banda a livello di server web (usi apache, vero?). esisteono diversi moduli che ti consentono di farlo, anche se nessuno fa parte della distribuzione standard. puoi dare un occhio qui: http://www.linuxdocs.org/HOWTOs/Apac...w-HOWTO-5.html il vantaggio di operare a livello più alto è che puoi operare le limitazioni a livello di virtual server, directory, utente, ip del richiedente, ecc.ecc. |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Sep 1999
Messaggi: 358
|
Grazie mille !
In questo articolo : http://www.cohprog.com/mod_bandwidth.html c'e' forse anche quello che serve a me, ovvero : # LargeFileLimit Syntax : LargeFileLimit <filesize> <rate> Default : none Context : per directory, .htaccess Set a maximal <rate> (in bytes/sec) to use when transfering a file of <filesize> KBytes or more. Several "LargeFileLimit" can be set for various files sizes to create range. The rate used for a given file size will be the one of the matching range. A <rate> of "0" mean that there isn't any limit based on the size. A <rate> of "-1" mean that there isn't any limit for that type of file. It's override even a BandWidth limit. I found this usefull to give priority to very small files (html pages, very small pictures) while seting limits for larger files... (users with their video files can go to hell ! ![]() Example : If the following limits are set : LargeFileLimit 200 3072 LargeFileLimit 1024 2048 That's mean that a file of less than 200KBytes won't be limited based on his size. A file with a size between 200KBytes (included) and 1023Kbytes (included) will be limited to 3072Bytes/sec and a file of 1024Kbytes or more will be limited to 2048Bytes/sec. Solo che ho un po' paura a ricompilare apache, perche' non l'ho mai fatto. Secondo te è complicato ? Rischio ?
__________________
-- La via del saggio è buia, ma la meta è splendente -- |
![]() |
![]() |
![]() |
#5 |
Senior Member
Iscritto dal: Jan 2001
Città: Milano
Messaggi: 5707
|
non ho utilizzato il modulo in questione, ma generalmente non hai necessità di ricompilare apache ma solo il modulo in questione che è poi caricato dinamicamente come DSO.
per moduli non parte della distribuzione standard (ad esempio mod_proxy_html) ho sempre fatto così. |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:04.