Delay Pools

1. Delay Pools

Alessandro Nascimento
profesandro

(usa Debian)

Enviado em 06/11/2009 - 09:30h

Pergunta: tem como eu reconfigurar o squid3 habilitando o delay pools sem precisar refazer tudo que já fiz? Obs.: O servidor ta funfando redondinho.


  


2. Re: Delay Pools

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 06/11/2009 - 10:01h

Reconfigurar no sentido d modificar o seu squid.conf? Se for isso tem jeito, sim. Siga este exemplo abaixo, do site http://www.tldp.org/HOWTO/Bandwidth-Limiting-HOWTO/install.html#AEN78:

#####DELAY POOLS
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at http://www.squid-cache.org

#We don't want to limit downloads on our local network.
acl magic_words1 url_regex -i 192.168

#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt
.ram .rm .iso .raw .wav .mov
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwidth

#We want to limit bandwidth during the day, and allow
#full bandwidth during the night
#Caution! with the acl below your downloads are likely to break
#at 23:59. Read the FAQ in this bandwidth if you want to avoid it.
acl day time 09:00-23:59

#We have two different delay_pools
#View Squid documentation to get familiar
#with delay_pools and delay_class.
delay_pools 2

#First delay pool
#We don't want to delay our local traffic.
#There are three pool classes; here we will deal only with the second.
#First delay class (1) of second type (2).
delay_class 1 2

#-1/-1 mean that there are no limits.
delay_parameters 1 -1/-1 -1/-1

#magic_words1: 192.168 we have set before
delay_access 1 allow magic_words1


#Second delay pool.
#we want to delay downloading files mentioned in magic_words2.
#Second delay class (2) of second type (2).
delay_class 2 2

#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s

delay_parameters 2 5000/150000 5000/120000
#We have set day to 09:00-23:59 before.
delay_access 2 allow day
delay_access 2 deny !day
delay_access 2 allow magic_words2


#EOF


3. Delay pools

Alessandro Nascimento
profesandro

(usa Debian)

Enviado em 06/11/2009 - 10:13h

Renato, vlw pela dica.. pelo que entendi no link que postou, terei que desintalar o squid e reinstala-lo compilando com delay pools.... Será que teria uma outra forma de habilitar o delay pools, já que o servidor ta rodando filé?


4. Re: Delay Pools

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 06/11/2009 - 11:24h

Infelizmente não, mas o q vc pode fazer é fazer um backup do squid.conf seu e instalar o novo. Depois teste o squid3 com esse squid.conf antigo e veja se irá t alguma incompatibilidade. À medida q vá dando problema, vc vai adequando as regras... é a única forma q eu vejo.


5. Delay

Alessandro Nascimento
profesandro

(usa Debian)

Enviado em 06/11/2009 - 13:24h

Vlw mesmo... vou testar aki e qualquer coisa eu respondo..






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts