using squid to limit bandwidth based on domain

using squid to limit bandwidth based on domain

Post by cwh.. » Sat, 16 Dec 2006 01:45:28



I have been reading about using delay pools with squid, but I am not
sure how this can solve the problem of restricting bandwidth according
to the site.

Delay pools seem to restrict based on your local network address, what
I would like to do is restrict the bandwidth taken up by sites like
video.google.com.  How can I accomplish this and where can I find
information on how to do it?

Thanks

 
 
 

using squid to limit bandwidth based on domain

Post by Artur Fryde » Sat, 16 Dec 2006 01:58:04



> I have been reading about using delay pools with squid, but I am not
> sure how this can solve the problem of restricting bandwidth according
> to the site.

> Delay pools seem to restrict based on your local network address, what
> I would like to do is restrict the bandwidth taken up by sites like
> video.google.com.  How can I accomplish this and where can I find
> information on how to do it?

Maybe you should use regex?
Something like this;

acl magic_words url_regex -i video.google.com
delay_pools 1
delay_class 1 1
delay_parameters 1 16000/16000
delay_access 1 allow magic_words

--
Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
In /dev/null no one can hear your scream

 
 
 

using squid to limit bandwidth based on domain

Post by cwh.. » Sat, 16 Dec 2006 03:30:59




> > I have been reading about using delay pools with squid, but I am not
> > sure how this can solve the problem of restricting bandwidth according
> > to the site.

> > Delay pools seem to restrict based on your local network address, what
> > I would like to do is restrict the bandwidth taken up by sites like
> > video.google.com.  How can I accomplish this and where can I find
> > information on how to do it?

> Maybe you should use regex?
> Something like this;

> acl magic_words url_regex -i video.google.com
> delay_pools 1
> delay_class 1 1
> delay_parameters 1 16000/16000
> delay_access 1 allow magic_words

> --
> Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
> In /dev/null no one can hear your scream

looks good to me, I'll give it a try and let you know what happens

I was looking at trying something similar but I would have totally
missed out the pools and class variables, mine would have looked like
this:

acl slow_it_down url_regex -i video.google.com
delay_parameters 1 16000/16000
delay_access 1 allow slow_it_down

which would probably end up doing nothing, or causing and error when i
tried to apply it and restart squid

please correct me if i'm wrong, but the parameter 16000/16000 should
slow it down to 128kbps, which is probably around the speed I was
looking to use :)

thanks!!!

 
 
 

using squid to limit bandwidth based on domain

Post by cwh.. » Sat, 16 Dec 2006 04:01:42




> > I have been reading about using delay pools with squid, but I am not
> > sure how this can solve the problem of restricting bandwidth according
> > to the site.

> > Delay pools seem to restrict based on your local network address, what
> > I would like to do is restrict the bandwidth taken up by sites like
> > video.google.com.  How can I accomplish this and where can I find
> > information on how to do it?

> Maybe you should use regex?
> Something like this;

> acl magic_words url_regex -i video.google.com
> delay_pools 1
> delay_class 1 1
> delay_parameters 1 16000/16000
> delay_access 1 allow magic_words

> --
> Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
> In /dev/null no one can hear your scream

just tested it, and as far as we can tell it works like a charm, on our
wirless network it can take up to 10 seconds for the browser to load
just 1 second of video

thanks again

 
 
 

using squid to limit bandwidth based on domain

Post by Artur Fryde » Sat, 23 Dec 2006 03:38:56



> please correct me if i'm wrong, but the parameter 16000/16000 should
> slow it down to 128kbps, which is probably around the speed I was
> looking to use :)

Yes. The first parameter is bandwidth limit for each file *bigger* than
the second parameter. In other words... if you download file bigger than
1600 bytes, after downloading 1600 bytes speed limit slow down to 128kbit.

More information, and complete squid book is here;
http://man.chinaunix.net/newsoft/squid/book-full-html/book-full.html

--
Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
"Always look on the bright side of life."

 
 
 

1. Squid limiting upload bandwidth

Hi !

I have a Linux server and squid 2.5 transparent proxy. I'm limiting
traffic with HTB and everything is working fine.
When someone on the network sends big file (webmail) over HTTP it takes
all upload bandwitch. I think  how to solve this:
- limit with HTB, but this will limit all users (while one is uploading
others will work slowly)
- limit with delay_pools, posible but i want upload to be 2-3 time
slower than download
- set small value to request_body_max_size but it will block sending
files over HTTP which i don't wan't.

Does anybody know how to slowdown upload transfers through squid ?

Best regards
Dixi

2. fix unresolved syms for serial drivers, 2.5.28

3. Newbie Bandwidth Limiting Based on Source interface

4. Help!How Can I make it see my CDROM

5. Limit Bandwidth For Virtual Domains

6. SONY CDU33A not Working

7. Limiting outgoing bandwidth per machine, using Linux (2.2.19) on ADSL

8. Original Mac hand leads Sun desktop charge

9. Limit bandwidth using QoS?

10. Bandwidth limiting using Linux as a router...

11. limiting bandwidth to a IP using linux

12. How to control the clients' bandwidth in SQUID?

13. Squid QoS with priority to hosts taking little bandwidth