 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Journey of a Network Engineer &#187; cache</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/network-engineering-journey/tag/cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/network-engineering-journey</link>
	<description></description>
	<lastBuildDate>Tue, 26 Feb 2013 11:05:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>How to configure ProxySG to cache youtube video?</title>
		<link>http://itknowledgeexchange.techtarget.com/network-engineering-journey/how-to-configure-proxysg-to-cache-youtube-video/</link>
		<comments>http://itknowledgeexchange.techtarget.com/network-engineering-journey/how-to-configure-proxysg-to-cache-youtube-video/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 05:18:55 +0000</pubDate>
		<dc:creator>Sulaiman Syed</dc:creator>
				<category><![CDATA[BlueCoat]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[googlevideo]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[proxysg]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/network-engineering-journey/how-to-cache-youtube-videos-using-bluecoat-proxysg/</guid>
		<description><![CDATA[Many medium to big organizations use ProxySG to filter and control the traffic leaving the enterprise network. One of the big strengths of Bluecoat ProxySG is the cache. It is one of the best cache devices out there in the market. As we all know, youtube can be considered one of the main web applications that eat [...]]]></description>
				<content:encoded><![CDATA[<p>Many medium to big organizations use ProxySG to filter and control the traffic leaving the enterprise network. One of the big strengths of Bluecoat ProxySG is the cache. It is one of the best cache devices out there in the market.</p>
<p>As we all know, youtube can be considered one of the main web applications that eat up the bandwidth. The content is very dynamic, and the url&#8217;s are ever changing. one of the main issues with youtube videos that they are served from various mirroring websites. Thus, proxySG can&#8217;t cache the videos by default since the URL are different for the same data. I have came across a policy that can be added to ProxySG. This will enable youtube caching!</p>
<blockquote><p>&lt;Proxy &#8220;YouTube specific caching rewrite&#8221;&gt; condition=youtube_related_request<br />
condition=youtube_seek_video_requests ; leave seek requests alone, not caching<br />
condition=youtube_video_request_style1 url.query.regex=&#8221;itag=34&#8243; action.rename_youtubeSD(yes)<br />
condition=youtube_video_request_style2 url.query.regex=&#8221;itag=34&#8243; action.rename_youtube_style2SD(yes)<br />
condition=youtube_video_request_style1 action.rename_youtube(yes)<br />
condition=youtube_video_request_style2 action.rename_youtube_style2(yes)<br />
condition=youtube_host_patterns condition=youtube_video_requests action.rename_youtube_url_hostname(yes)<br />
&lt;Cache &#8220;video content&#8221;&gt;</p>
<p>; YOUTUBE &amp; GOOGLEVIDEO &#8211; 10 days<br />
[rule]<br />
condition=youtube_seek_video_requests cache(no)<br />
condition=youtube_video_requests ttl(864000) force_cache(all)</p>
<p>; YOUTUBE DEFINITIONS<br />
;<br />
define condition youtube_related_request<br />
request.header.Referer.exists=yes condition=youtube_referer_present<br />
condition=youtube_host_patterns<br />
end</p>
<p>define condition youtube_host_patterns<br />
url.host.substring=&#8221;youtube&#8221;<br />
url.host.substring=&#8221;googlevideo&#8221;<br />
url.host.is_numeric=yes url.address=youtube_subnets<br />
end</p>
<p>define subnet youtube_subnets<br />
;; these can be fairly broadly drawn, since appearance in here<br />
;; alone does not itself force youtubeization; the request also<br />
;; has to be relatively youtube specific.<br />
;; IE this is an optimization, not a pure correctness filter<br />
; observed in eval logs Mar2010</p>
<p>74.125.0.0/16    ; GOOGLE NET-74-125-0-0-1<br />
173.194.0.0/16   ; GOOGLE NET-173-194-0-0-1<br />
;204.246.234.23/24 ; used by cache but assigned to frontiernet.net<br />
;youtube_ARIN_IPs<br />
;IPv4 CIDR:<br />
208.65.152.0/22  ; YOUTUBE<br />
64.15.112.0/20   ; YOUTUBE2<br />
208.117.224.0/19 ; YOUTUBE3<br />
72.51.34.221/32<br />
72.51.34.222/31<br />
72.51.34.224/29<br />
72.51.34.232/30<br />
72.51.34.236/32<br />
72.51.35.205/32<br />
72.51.35.206/31<br />
72.51.35.208/30<br />
72.51.35.212/32<br />
; 75.35.233.64/29   ; now sbcglobal<br />
; 75.31.180.240/29  ; now sbcglobal<br />
76.210.160.216/29<br />
76.208.211.160/29<br />
; 75.48.116.72/29   ; now sbcglobal<br />
75.55.218.8/29<br />
;IPv6 CIDR:<br />
;2620:0000:0040:0000:0000:0000:0000:0000/48<br />
;<br />
;youtube_RIPE_IPs<br />
;IPv4 CIDR:<br />
194.221.68.0/24<br />
195.27.182.0/24<br />
195.59.171.0/24<br />
213.146.171.0/24<br />
82.129.37.0/24     ; YOUTUBE-EUROPE<br />
89.207.225.0/24<br />
209.85.128.0/17    ; Seen at Mobily<br />
end</p>
<p>define condition youtube_referer_present<br />
request.header.Referer.url.substring=&#8221;ytimg&#8221;<br />
request.header.Referer.url.substring=&#8221;youtube&#8221;<br />
request.header.Referer.url.substring=&#8221;video.google.com&#8221;<br />
end</p>
<p>define condition youtube_video_request_style1<br />
url.path.exact=&#8221;/get_video&#8221; url.query.regex=&#8221;video_id=&#8221;<br />
end</p>
<p>define condition youtube_video_request_style2<br />
url.path.exact=&#8221;/videoplayback&#8221; url.query.regex=&#8221;id=&#8221;<br />
end</p>
<p>define condition youtube_video_requests<br />
condition=youtube_video_request_style1<br />
condition=youtube_video_request_style2<br />
end</p>
<p>define condition youtube_seek_video_requests<br />
url.path.exact=/videoplayback url.query.regex=&#8221;begin=[1-9]&#8221;<br />
url.path.exact=/get_video url.query.regex=&#8221;begin=[1-9]&#8221;<br />
end</p>
<p>define action rename_youtube<br />
;&#8211;NOTE the following is one line (approximately 120 characters long)<br />
rewrite(url, &#8220;(.+)video_id=([^&amp;]+)(\&amp;.*|$)&#8221;, &#8220;http://youtube.proxysg-cache/get_video/$(2)&#8221;, cache)<br />
end</p>
<p>define action rename_youtube_style2<br />
;&#8211;NOTE the following is one line (approximately 120 characters long)<br />
rewrite(url, &#8220;(.+)id=([^&amp;]+)(\&amp;.*|$)&#8221;, &#8220;http://youtube.proxysg-cache/get_video_style2/$(2)&#8221;, cache)<br />
end</p>
<p>define action rename_youtubeSD<br />
;&#8211;NOTE the following is one line (approximately 120 characters long)<br />
rewrite(url, &#8220;(.+)video_id=([^&amp;]+)(\&amp;.*|$)&#8221;, &#8220;http://youtube.proxysg-cache/get_video/$(2)_SD&#8221;, cache)<br />
end</p>
<p>define action rename_youtube_style2SD<br />
;&#8211;NOTE the following is one line (approximately 120 characters long)<br />
rewrite(url, &#8220;(.+)id=([^&amp;]+)(\&amp;.*|$)&#8221;, &#8220;http://youtube.proxysg-cache/get_video_style2/$(2)_SD&#8221;, cache)<br />
end</p>
<p>define action rename_youtube_url_hostname<br />
rewrite(url.host, &#8220;.*&#8221;, &#8220;youtube.proxysg-cache&#8221;, cache)<br />
end</p></blockquote>
<p>This policy was not written by me. but of course it can be used by any ProxySG administrator. Please just copy paste it into the local policy files.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/network-engineering-journey/how-to-configure-proxysg-to-cache-youtube-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
