<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=986495214-23112007><FONT face=Arial size=2>As promised, here is 
a proposal for a new definition of what varnish is for the FAQ (links in 
<>, changes in bold, comments in []). I did compile some mails exchanged 
the last days on varnish-dev, credit for this goes to many 
people.</FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial size=2>My mother tongue not 
being english, there might be quite a few spelling/grammatical 
errors.</FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007>
<H3 id=WhybotherwithVarnish-whynotuseSquid><FONT face=Arial>What is varnish ? 
[new]</FONT></H3>
<DIV><SPAN class=986495214-23112007><FONT face=Arial><FONT size=2>Varnish is a 
HTTP accelerator : a high performance HTTP server to be put in front of a 
slow one (like apache) to speed up an existing website. Rather than a true 
reverse proxy (as in <<FONT color=#0000ff><U>RFC2616</U></FONT>>), varnish 
is a "HTTP surrogate", as defined in the <<FONT color=#0000ff size=2><U>Edge 
Architecture Specification</U></FONT><FONT size=2>> w3c draft. Varnish can be 
very easily adapted to any website, and <<U><FONT color=#0000ff>become a 
reverse proxy</FONT></U>> with a few lines of configuration</FONT> [link to 
the section in the FAQ, below]. </FONT></FONT></SPAN></DIV>
<H3><FONT face=Arial>Why bother with Varnish - why not use Squid ? 
[modified]</FONT></H3></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial size=2>Varnish was written 
from the ground up to be a high performance <STRONG>HTTP accelerator</STRONG>. 
Squid is a forward proxy that can be configured as a reverse proxy, 
<STRONG>that, as a side effect, can provide HTTP accelerating features</STRONG>. 
Besides - Squid is rather old, <STRONG>bloated</STRONG> and designed like 
computer programs where supposed to be designed in 1980. Please see 
<</FONT><A class=wiki 
href="http://varnish.projects.linpro.no/wiki/ArchitectNotes"><FONT face=Arial 
size=2>ArchitectNotes</FONT></A><FONT face=Arial size=2>> for 
details.</FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT size=2>
<H3><FONT face=Arial>How do I configure varnish to act like a classical reverse 
proxy ? [new]</FONT></H3>
<DIV><SPAN class=986495214-23112007><FONT face=Arial size=2>Here is a sample VCL 
to do this :</FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>backend default 
{<BR></FONT></SPAN><SPAN class=986495214-23112007><FONT 
face=Arial>                
set backend.host = 
"backend.example.com";<BR>                
set backend.port = "http";<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_recv 
{</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT 
face=Arial>        if (req.request != "GET" 
&& req.request != "HEAD") 
{<BR>                
pipe;<BR>        
}<BR>        if (req.http.Expect) 
{<BR>                
pipe;<BR>        
}<BR>        if (req.http.Authenticate) 
{<BR>                
pass;<BR>        
}<BR>        if (req.http.Cache-Control ~ 
"no-cache") 
{<BR>                
pass;<BR>        
}<BR>        lookup;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_pipe 
{<BR>        pipe;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_pass 
{<BR>        pass;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_hash 
{<BR>        set req.hash += 
req.url;<BR>        set req.hash += 
req.http.host;<BR>        
hash;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_hit 
{<BR>        if (!obj.cacheable) 
{<BR>                
pass;<BR>        
}<BR>        
deliver;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_miss 
{<BR>            
fetch;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_fetch 
{<BR>        if (!obj.valid) 
{<BR>                
error;<BR>        
}<BR>        if (!obj.cacheable) 
{<BR>                
pass;<BR>        
}<BR>        if (obj.http.Set-Cookie) 
{<BR>                
pass;<BR>        
}<BR>        if (obj.http.Pragma ~ "no-cache" 
|| obj.http.Cache-Control ~ "(no-cache|private)" ) 
{<BR>                
pass;<BR>        
}<BR>        insert;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_deliver 
{<BR>        
deliver;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_timeout 
{<BR>        
discard;<BR>}</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>sub vcl_discard 
{<BR>        
discard;<BR>}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT face=Arial>What do you think of this 
?</FONT></SPAN></DIV>
<DIV><SPAN class=986495214-23112007><FONT 
face=Arial></FONT></SPAN> </DIV></FONT></SPAN></DIV>
<DIV align=left><FONT face=Tahoma size=2>Jean-François Bustarret</FONT></DIV>
<DIV align=left><FONT face=Tahoma size=1><STRONG>WAT - Responsable 
technique</STRONG></FONT></DIV>
<DIV align=left><STRONG><FONT face=Tahoma 
size=1>http://www.wat.tv</FONT></STRONG></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>