<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments for The Squid Web Proxy/Cache Blog</title>
	<atom:link href="http://squidproxy.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://squidproxy.wordpress.com</link>
	<description>Squid developments and stuff.</description>
	<pubDate>Thu, 03 Jul 2008 22:28:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>Comment on Things to look at if websites are hanging! by Chunked Decoding &#171; The Squid Web Proxy/Cache Blog</title>
		<link>http://squidproxy.wordpress.com/2007/06/05/thinsg-to-look-at-if-websites-are-hanging/#comment-195</link>
		<dc:creator>Chunked Decoding &#171; The Squid Web Proxy/Cache Blog</dc:creator>
		<pubDate>Tue, 29 Apr 2008 14:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/06/05/thinsg-to-look-at-if-websites-are-hanging/#comment-195</guid>
		<description>[...] familiar to some yes? I&#8217;m bringing it up now because while it is an old problem, its not the TCP issues Adrian wrote about earlier and you should also check if you find its not this. Which incidentally can have exactly the same [...]</description>
		<content:encoded><![CDATA[<p>[...] familiar to some yes? I&#8217;m bringing it up now because while it is an old problem, its not the TCP issues Adrian wrote about earlier and you should also check if you find its not this. Which incidentally can have exactly the same [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Squid Configuration Manual by revconnect</title>
		<link>http://squidproxy.wordpress.com/2007/07/16/the-squid-configuration-manual/#comment-181</link>
		<dc:creator>revconnect</dc:creator>
		<pubDate>Thu, 27 Mar 2008 01:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/07/16/the-squid-configuration-manual/#comment-181</guid>
		<description>Thanks For The Config Manual</description>
		<content:encoded><![CDATA[<p>Thanks For The Config Manual</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Squid-2 updates: Logfiles and buffers by mmarch</title>
		<link>http://squidproxy.wordpress.com/2007/09/23/squid-2-updates-logfiles-and-buffers/#comment-178</link>
		<dc:creator>mmarch</dc:creator>
		<pubDate>Wed, 20 Feb 2008 18:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/09/23/squid-2-updates-logfiles-and-buffers/#comment-178</guid>
		<description>Hi Adrian,
    I've written a simple perl script which logs on a mysql table. I've put it together quickly to see if/how the whole thing worked, and I'm planning to refine it on the next days.


Relevant squid configuration directives:

access_log daemon:/var/log/squid/access.log squid
logfile_daemon /usr/squid/libexec/logfile-daemon_mysql.pl


MySQL script:

CREATE DATABASE squid_devel_log;
GRANT INSERT,SELECT ON squid_devel_log.* TO 'squid'@'localhost' IDENTIFIED BY 'squid';

--
-- This table is based on squid's default 'squid' logformat, with minor modifications
-- (the two slashes are removed)
-- original:
-- logformat squid  %ts.%03tu %6tr %&#62;a %Ss/%03Hs %&#60;st %rm %ru %un %Sh/%&lt;A&gt;a %Ss %03Hs %&#60;st %rm %ru %un %Sh %&lt;A&gt;connect($dsn, $user, $pass, { AutoCommit =&#62; 1, RaiseError =&#62; 1, PrintError =&#62; 1 }) or die $DBI::errstr;

my $sth = $dbh-&#62;prepare("INSERT INTO $table VALUES(NULL,?,?,?,?,?,?,?,?,?,?,?,?)");

while (my $line = ) {
    chomp $line;

    my $cmd = substr($line, 0, 1);      # command
    substr($line, 0, 1, ' ');        # substitute the command byte with a blank
    if ( $cmd eq 'L' ) {
        my @values = split / \s+ /xms, $line;
        shift @values;          # the first blank generates an empty bind value that has to be removed
        eval {
            $sth-&#62;execute(@values) or die $sth-&#62;errstr
        };
        if ( $@ ) {
            warn $@ . " values=(" . join(',', @values) . ")";
        }
    }
}

$dbh-&#62;disconnect();



As you can see, it's very primitive, but I've tested on two systems of mine and it works.
Some things that I'll have to address shortly:
- sql data types: now they're all strings, but some of them are better stored directly as numbers, to allow correct sorting, calculations, etc. (e.g. avg(response_time), max(response_time))
- currently the path is ignored: it could be used to specify the database connection details directly as a dsn or via some sort of custom syntax (e.g. to allow passing username and password)
- or the path could be used to point to a configuration file which would hold in a simple format (key: value, e.g. yaml) the connection details and maybe some other directive for the perl script.
- on startup, test the database via some simple SELECT statements and warn() the user if it's not properly setup, so e.g. one doesn't get a squid crash if the table structure is wrong because the log script die()s.
- implement the other command-codes. One idea is for example to implement the "rotate logs" command as something like "calculate summary data based on the current log records, store that data in a "summary" table) and delete all the log records"

Thanks for your work on squid!

Marcello</description>
		<content:encoded><![CDATA[<p>Hi Adrian,<br />
    I&#8217;ve written a simple perl script which logs on a mysql table. I&#8217;ve put it together quickly to see if/how the whole thing worked, and I&#8217;m planning to refine it on the next days.</p>
<p>Relevant squid configuration directives:</p>
<p>access_log daemon:/var/log/squid/access.log squid<br />
logfile_daemon /usr/squid/libexec/logfile-daemon_mysql.pl</p>
<p>MySQL script:</p>
<p>CREATE DATABASE squid_devel_log;<br />
GRANT INSERT,SELECT ON squid_devel_log.* TO &#8217;squid&#8217;@'localhost&#8217; IDENTIFIED BY &#8217;squid&#8217;;</p>
<p>&#8211;<br />
&#8211; This table is based on squid&#8217;s default &#8217;squid&#8217; logformat, with minor modifications<br />
&#8211; (the two slashes are removed)<br />
&#8211; original:<br />
&#8211; logformat squid  %ts.%03tu %6tr %&gt;a %Ss/%03Hs %&lt;st %rm %ru %un %Sh/%<a>a %Ss %03Hs %&lt;st %rm %ru %un %Sh %</a><a>connect($dsn, $user, $pass, { AutoCommit =&gt; 1, RaiseError =&gt; 1, PrintError =&gt; 1 }) or die $DBI::errstr;</p>
<p>my $sth = $dbh-&gt;prepare(&#8221;INSERT INTO $table VALUES(NULL,?,?,?,?,?,?,?,?,?,?,?,?)&#8221;);</p>
<p>while (my $line = ) {<br />
    chomp $line;</p>
<p>    my $cmd = substr($line, 0, 1);      # command<br />
    substr($line, 0, 1, &#8216; &#8216;);        # substitute the command byte with a blank<br />
    if ( $cmd eq &#8216;L&#8217; ) {<br />
        my @values = split / \s+ /xms, $line;<br />
        shift @values;          # the first blank generates an empty bind value that has to be removed<br />
        eval {<br />
            $sth-&gt;execute(@values) or die $sth-&gt;errstr<br />
        };<br />
        if ( $@ ) {<br />
            warn $@ . &#8221; values=(&#8221; . join(&#8217;,', @values) . &#8220;)&#8221;;<br />
        }<br />
    }<br />
}</p>
<p>$dbh-&gt;disconnect();</p>
<p>As you can see, it&#8217;s very primitive, but I&#8217;ve tested on two systems of mine and it works.<br />
Some things that I&#8217;ll have to address shortly:<br />
- sql data types: now they&#8217;re all strings, but some of them are better stored directly as numbers, to allow correct sorting, calculations, etc. (e.g. avg(response_time), max(response_time))<br />
- currently the path is ignored: it could be used to specify the database connection details directly as a dsn or via some sort of custom syntax (e.g. to allow passing username and password)<br />
- or the path could be used to point to a configuration file which would hold in a simple format (key: value, e.g. yaml) the connection details and maybe some other directive for the perl script.<br />
- on startup, test the database via some simple SELECT statements and warn() the user if it&#8217;s not properly setup, so e.g. one doesn&#8217;t get a squid crash if the table structure is wrong because the log script die()s.<br />
- implement the other command-codes. One idea is for example to implement the &#8220;rotate logs&#8221; command as something like &#8220;calculate summary data based on the current log records, store that data in a &#8220;summary&#8221; table) and delete all the log records&#8221;</p>
<p>Thanks for your work on squid!</p>
<p>Marcello</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How cachable is google (part 2) - Youtube content by chudycebu</title>
		<link>http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-177</link>
		<dc:creator>chudycebu</dc:creator>
		<pubDate>Fri, 08 Feb 2008 16:40:37 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-177</guid>
		<description>I've been trying to look for this squid that has this storeurl_rewrite features and found out that is still on development. Currently using Windows XP squid-2.6.STABLE18 (10 Jan 2008)

I just want to cache the youtube videos (bec its #1 bandwidth sucker and #2 is the imeem)  refresh pattern get_video just works fine for 3years until last thursday. Youtube has been upgraded their url video files.

They add signature, your ip, ipbits, expire, and key in url video files. so it no longer be cache bec signature always change.  so i try to use urlrewrite temporarity until storeurlrewrite feature is up.

$&#124; = 1;

while () {
        chomp;
        # print STDERR $_ . "\n";
        if  (m/^http:\/\/([A-Za-z]*?)-(.*?)\.(.*)\.youtube\.com\/get_video\?video_id=(.*)\&#38;signature=(.*)\&#38;ip=(.*)\&#38;ipbits=(.*)\&#38;expire=(.*)\&#38;key=(.*) /) {
                print "http://" . $1 . "-" . $2 . "." . $3 . ".youtube.com/get_video?video_id=" . $4 . "\n";
        } elsif (m/^http:\/\/(.*?)\/get_video\?video_id=(.*)\&#38;origin=(.*)\&#38;signature=(.*)\&#38;ip=(.*)\&#38;ipbits=(.*)\&#38;expire=(.*)\&#38;key=(.*) /) {
                print "http://" . $3 . "/get_video?video_id=" . $2 . "\n";
        } else {
                print $_ . "\n";
        }
}

i just bypass the CDN network and use the origin url from youtube.
if the storeurlrewrite feature i really love to cache imeem(which is the #2 most annoying bandwidth sucker)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to look for this squid that has this storeurl_rewrite features and found out that is still on development. Currently using Windows XP squid-2.6.STABLE18 (10 Jan 200 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<p>I just want to cache the youtube videos (bec its #1 bandwidth sucker and #2 is the imeem)  refresh pattern get_video just works fine for 3years until last thursday. Youtube has been upgraded their url video files.</p>
<p>They add signature, your ip, ipbits, expire, and key in url video files. so it no longer be cache bec signature always change.  so i try to use urlrewrite temporarity until storeurlrewrite feature is up.</p>
<p>$| = 1;</p>
<p>while () {<br />
        chomp;<br />
        # print STDERR $_ . &#8220;\n&#8221;;<br />
        if  (m/^http:\/\/([A-Za-z]*?)-(.*?)\.(.*)\.youtube\.com\/get_video\?video_id=(.*)\&amp;signature=(.*)\&amp;ip=(.*)\&amp;ipbits=(.*)\&amp;expire=(.*)\&amp;key=(.*) /) {<br />
                print &#8220;http://&#8221; . $1 . &#8220;-&#8221; . $2 . &#8220;.&#8221; . $3 . &#8220;.youtube.com/get_video?video_id=&#8221; . $4 . &#8220;\n&#8221;;<br />
        } elsif (m/^http:\/\/(.*?)\/get_video\?video_id=(.*)\&amp;origin=(.*)\&amp;signature=(.*)\&amp;ip=(.*)\&amp;ipbits=(.*)\&amp;expire=(.*)\&amp;key=(.*) /) {<br />
                print &#8220;http://&#8221; . $3 . &#8220;/get_video?video_id=&#8221; . $2 . &#8220;\n&#8221;;<br />
        } else {<br />
                print $_ . &#8220;\n&#8221;;<br />
        }<br />
}</p>
<p>i just bypass the CDN network and use the origin url from youtube.<br />
if the storeurlrewrite feature i really love to cache imeem(which is the #2 most annoying bandwidth sucker)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whats going on with Squid-2 and Squid-3 ? by Adrian Chadd</title>
		<link>http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-155</link>
		<dc:creator>Adrian Chadd</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-155</guid>
		<description>tgbyhn,

Varnish is a fun project.

phk has plenty of great ideas, but the Varnish design is tailored towards a specific workload (ie mostly fits in RAM) which handles small objects. Varnish doesn't take advantage of things that Web Caches should (like object locality on disk) and, well, Squid doesn't either, but Varnish actively avoids doing so by putting all its faith in the operating system VM system. You can't scale specific workloads that way.

There's nothing wrong with the Squid design per se. Plenty of high performance applications look like squid do, they just don't copy data around as much.

Squid, in its core, is just a big event processing loop. Eventually this'll have to be modified to support SMP but the basic theory is fine. What we need to do is change how we work with the disk and network to be more efficient and thats precisely what I'm doing.

Ideally Squid in ~ 12 months will look at lot more interesting. Just realise that phk and des are funded to do this and I'm mostly doing this for free.</description>
		<content:encoded><![CDATA[<p>tgbyhn,</p>
<p>Varnish is a fun project.</p>
<p>phk has plenty of great ideas, but the Varnish design is tailored towards a specific workload (ie mostly fits in RAM) which handles small objects. Varnish doesn&#8217;t take advantage of things that Web Caches should (like object locality on disk) and, well, Squid doesn&#8217;t either, but Varnish actively avoids doing so by putting all its faith in the operating system VM system. You can&#8217;t scale specific workloads that way.</p>
<p>There&#8217;s nothing wrong with the Squid design per se. Plenty of high performance applications look like squid do, they just don&#8217;t copy data around as much.</p>
<p>Squid, in its core, is just a big event processing loop. Eventually this&#8217;ll have to be modified to support SMP but the basic theory is fine. What we need to do is change how we work with the disk and network to be more efficient and thats precisely what I&#8217;m doing.</p>
<p>Ideally Squid in ~ 12 months will look at lot more interesting. Just realise that phk and des are funded to do this and I&#8217;m mostly doing this for free.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whats going on with Squid-2 and Squid-3 ? by Adrian Chadd</title>
		<link>http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-154</link>
		<dc:creator>Adrian Chadd</dc:creator>
		<pubDate>Thu, 10 Jan 2008 22:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-154</guid>
		<description>ohernandez;

Squid doesn't currently support RTSP. We'd love to support it but it'll take time to code up and none of us actually work for ISPs or companies that have these requirements. We basically need to find funding to code this stuff up.

Send me an email if you're interested in looking into helping with this.</description>
		<content:encoded><![CDATA[<p>ohernandez;</p>
<p>Squid doesn&#8217;t currently support RTSP. We&#8217;d love to support it but it&#8217;ll take time to code up and none of us actually work for ISPs or companies that have these requirements. We basically need to find funding to code this stuff up.</p>
<p>Send me an email if you&#8217;re interested in looking into helping with this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whats going on with Squid-2 and Squid-3 ? by ohernandez</title>
		<link>http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-152</link>
		<dc:creator>ohernandez</dc:creator>
		<pubDate>Thu, 10 Jan 2008 20:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-152</guid>
		<description>Hello, 
Squid currently support RTSP ?
i can't access to view windows media, you know alternative for doing this ?</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Squid currently support RTSP ?<br />
i can&#8217;t access to view windows media, you know alternative for doing this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Whats going on with Squid-2 and Squid-3 ? by tgbyhn</title>
		<link>http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-150</link>
		<dc:creator>tgbyhn</dc:creator>
		<pubDate>Thu, 10 Jan 2008 17:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2008/01/10/whats-going-on-with-squid-2-and-squid-3/#comment-150</guid>
		<description>I like the idea of reducing copying between buffers. What do you think of the Varnish design. The Varnish design takes copy avoidance to the extreme.

The Varnish developer claims that the Squid design is something that should be avoided. I would be really interested in hearing your take.</description>
		<content:encoded><![CDATA[<p>I like the idea of reducing copying between buffers. What do you think of the Varnish design. The Varnish design takes copy avoidance to the extreme.</p>
<p>The Varnish developer claims that the Squid design is something that should be avoided. I would be really interested in hearing your take.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How cachable is google (part 2) - Youtube content by Adrian Chadd</title>
		<link>http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-129</link>
		<dc:creator>Adrian Chadd</dc:creator>
		<pubDate>Tue, 25 Dec 2007 15:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-129</guid>
		<description>The legality isn't my concern really. This stuff isn't prefetching Google Earth, nor is it distributing "map packs" to make things faster. Its simply caching the content like any other content. Google isn't specifically trying to make the map tile images uncachable.</description>
		<content:encoded><![CDATA[<p>The legality isn&#8217;t my concern really. This stuff isn&#8217;t prefetching Google Earth, nor is it distributing &#8220;map packs&#8221; to make things faster. Its simply caching the content like any other content. Google isn&#8217;t specifically trying to make the map tile images uncachable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How cachable is google (part 2) - Youtube content by phreaki</title>
		<link>http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-121</link>
		<dc:creator>phreaki</dc:creator>
		<pubDate>Thu, 20 Dec 2007 03:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://squidproxy.wordpress.com/2007/11/17/how-cachable-is-google-part-2-youtube-content/#comment-121</guid>
		<description>Thanks for working on this very important task!

Small and third pipe operators need this type of caching to offset P2P, so I'll be trying this method out soon. 

I ponder however: Google Earth? I don't know if it uses SSL, but others have gotten into trouble for making 'map packs'. I hope the DMCA could protect like it's intended for those that try to make everything uncacheable.</description>
		<content:encoded><![CDATA[<p>Thanks for working on this very important task!</p>
<p>Small and third pipe operators need this type of caching to offset P2P, so I&#8217;ll be trying this method out soon. </p>
<p>I ponder however: Google Earth? I don&#8217;t know if it uses SSL, but others have gotten into trouble for making &#8216;map packs&#8217;. I hope the DMCA could protect like it&#8217;s intended for those that try to make everything uncacheable.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
