Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Squid and Youtube/Google Video

Status
Not open for further replies.

glio

Technical User
Sep 25, 2002
77
MO
Environment: Squid 2.5 STABLE9 running on FC4

When my workstations try to access YouTube or Google Video... etc, the Squid seems to cache all the video first before presenting to the workstations. What do I need to do if I want my workstations to play the video on loading.

Jimmy
 
The obvious answer is to not allow SQUID to cache the requests.

Cut directly from the SQUID FAQ:

7.8 How can I make Squid NOT cache some servers or URLs?
In Squid-2, you use the no_cache option to specify uncachable requests. For example, this makes all responses from origin servers in the 10.0.1.0/24 network uncachable:
Code:
        acl Local dst 10.0.1.0/24
        no_cache deny Local
This example makes all URL's with '.html' uncachable:
Code:
        acl HTML url_regex .html$
        no_cache deny HTML
This example makes a specific URL uncachable:
Code:
        acl XYZZY url_regex ^[URL unfurl="true"]http://www.i.suck.com/foo.html$[/URL]
        no_cache deny XYZZY
This example caches nothing between the hours of 8AM to 11AM:
acl Morning time 08:00-11:00
no_cache deny Morning

In Squid-1.1, whether or not an object gets cached is controlled by the cache_stoplist, and cache_stoplist_pattern options. So, you may add:
cache_stoplist my.domain.com

Specifying uncachable objects by IP address is harder. The 1.1 patch page includes a patch called no-cache-local.patch which changes the behaviour of the local_ip and local_domain so that matching requests are NOT CACHED, in addition to being fetched directly.

located at:



pansophic
 
Hmm... that's one way out... do you think we can have a better solution? One that combines the two so that the first workstation accessing the video can play the video thru streaming while the Squid is caching the same video?

Jimmy
 
If you want one worksatation to get the video bypassing squid, squid will not cache it for any other.

QatQat

Life is what happens when you are making other plans.
 
acl Morning time 08:00-11:00
no_cache deny Morning

Hmmm... or is that....

acl Morning time 08:00-09:00
no_coffee deny Work

;)


Just my 2¢

"In order to start solving a problem, one must first identify its owner." --Me
--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top