r5261 - in branches/2.1: . varnish-cache/bin/varnishd varnish-cache/bin/varnishtest/tests varnish-cache/doc/sphinx/installation varnish-cache/doc/sphinx/phk varnish-cache/doc/sphinx/tutorial varnish-cache/include varnish-cache/lib/libvarnish varnish-cache/lib/libvcl

tfheen at varnish-cache.org tfheen at varnish-cache.org
Wed Sep 22 13:49:51 CEST 2010


Author: tfheen
Date: 2010-09-22 13:49:51 +0200 (Wed, 22 Sep 2010)
New Revision: 5261

Added:
   branches/2.1/varnish-cache/doc/sphinx/phk/thoughts.rst
Modified:
   branches/2.1/
   branches/2.1/varnish-cache/bin/varnishd/cache_backend.h
   branches/2.1/varnish-cache/bin/varnishd/cache_backend_cfg.c
   branches/2.1/varnish-cache/bin/varnishd/vparam.h
   branches/2.1/varnish-cache/bin/varnishtest/tests/c00019.vtc
   branches/2.1/varnish-cache/bin/varnishtest/tests/r00325.vtc
   branches/2.1/varnish-cache/bin/varnishtest/tests/r00416.vtc
   branches/2.1/varnish-cache/bin/varnishtest/tests/v00011.vtc
   branches/2.1/varnish-cache/doc/sphinx/installation/install.rst
   branches/2.1/varnish-cache/doc/sphinx/phk/index.rst
   branches/2.1/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst
   branches/2.1/varnish-cache/doc/sphinx/tutorial/troubleshooting.rst
   branches/2.1/varnish-cache/doc/sphinx/tutorial/vcl.rst
   branches/2.1/varnish-cache/include/vct.h
   branches/2.1/varnish-cache/include/vev.h
   branches/2.1/varnish-cache/lib/libvarnish/tcp.c
   branches/2.1/varnish-cache/lib/libvarnish/vev.c
   branches/2.1/varnish-cache/lib/libvcl/vcc_dir_random.c
Log:
Merge r4862: upd



Property changes on: branches/2.1
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:4637,4640,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk:4637,4640,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishd/cache_backend.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishd/cache_backend.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishd/cache_backend.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishd/cache_backend_cfg.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishd/vparam.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishd/vparam.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishd/vparam.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/c00019.vtc
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/r00325.vtc
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishtest/tests/r00325.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishtest/tests/r00325.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/r00416.vtc
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishtest/tests/r00416.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishtest/tests/r00416.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/bin/varnishtest/tests/v00011.vtc
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/bin/varnishtest/tests/v00011.vtc:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170

Modified: branches/2.1/varnish-cache/doc/sphinx/installation/install.rst
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/installation/install.rst	2010-09-22 11:31:55 UTC (rev 5260)
+++ branches/2.1/varnish-cache/doc/sphinx/installation/install.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -43,7 +43,7 @@
 	You are probably best of compiling your own code. See `Compiling Varnish from source`_.
 
 If that worked for you, you can skip the rest of this document
-for now, and and start reading the much more interesting :ref:`Tutorial`
+for now, and and start reading the much more interesting :ref:`tutorial-index`
 instead.
 
 

Modified: branches/2.1/varnish-cache/doc/sphinx/phk/index.rst
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/phk/index.rst	2010-09-22 11:31:55 UTC (rev 5260)
+++ branches/2.1/varnish-cache/doc/sphinx/phk/index.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -8,6 +8,7 @@
 
 .. toctree::
 
+	thoughts.rst
+	autocrap.rst
 	sphinx.rst
-	autocrap.rst
 

Copied: branches/2.1/varnish-cache/doc/sphinx/phk/thoughts.rst (from rev 4862, trunk/varnish-cache/doc/sphinx/phk/thoughts.rst)
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/phk/thoughts.rst	                        (rev 0)
+++ branches/2.1/varnish-cache/doc/sphinx/phk/thoughts.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -0,0 +1,35 @@
+.. _phk_thoughts:
+
+=========================
+What were they thinking ?
+=========================
+
+The reason I try to write these notes is the chinese wall.
+
+Ever since I first saw it on a school-book map, I have been wondering
+what the decision making process were like.
+
+We would like to think that the emperor asked for ideas, and that
+advisors came up with analyses, budgets, cost/benefit calculations
+and project plans for various proposals, and that the emperor applied
+his wisdom to choose the better idea.
+
+But it could also be, that The Assistant to The Deputy Viceminister of
+Northern Affairs, edged in sideways, at a carefully chosen time where
+the emperor looked relaxed and friendly, and sort of happend to mention
+that 50 villages had been sort of raided by the barbarians, hoping
+for the reply, which would not be a career opportunity
+for The Assistant to The Assistant to The Deputy Viceminister of
+Northern Affairs.
+
+And likely as not, the emperor absentmindedly grunted "Why don't
+you just build a wall to keep them out or something ?"  probably
+wondering about the competence of an administration, which could
+not figure out to build palisades around border villages without
+bothering him and causing a monument to the Peter Principle and
+Parkinssons Law to be built, which can be seen from orbit, and
+possibly from the moon, if you bring your binoculars.
+
+If somebody had written some notes, we might have known.
+
+Poul-Henning, 2010-05-28

Modified: branches/2.1/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst	2010-09-22 11:31:55 UTC (rev 5260)
+++ branches/2.1/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -22,8 +22,8 @@
 give you the result. I use two programs, GET and HEAD.
 
 vg.no was the first site to use Varnish and the people running Varnish
-there are quite clueful. So its interesting to look at their HTTP
-Headers. Lets send a GET requst for their home page.::
+there are quite cluefull. So its interesting to look at their HTTP
+Headers. Lets send a GET request for their home page.::
 
   $ GET -H 'Host: www.vg.no' -Used http://vg.no/
   GET http://vg.no/
@@ -81,9 +81,8 @@
 cares about the *max-age* parameter and uses it to calculate the TTL
 for an object. 
 
-"Cache-Control: nocache" is ignored. See
-:ref:`tutorial-increasing_your_hitrate-pragma:` for an example on how
-to implement support.
+"Cache-Control: nocache" is ignored but if you need this you can
+easyli add support for it.
 
 So make sure use issue a Cache-Control header with a max-age
 header. You can have a look at what Varnish Softwares drupal server

Modified: branches/2.1/varnish-cache/doc/sphinx/tutorial/troubleshooting.rst
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/tutorial/troubleshooting.rst	2010-09-22 11:31:55 UTC (rev 5260)
+++ branches/2.1/varnish-cache/doc/sphinx/tutorial/troubleshooting.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -65,5 +65,5 @@
 Varnish doesn't cache
 ~~~~~~~~~~~~~~~~~~~~~
 
-See :ref:`_tutorial-increasing_your_hitrate:`.
+See :ref:`tutorial-increasing_your_hitrate`.
 

Modified: branches/2.1/varnish-cache/doc/sphinx/tutorial/vcl.rst
===================================================================
--- branches/2.1/varnish-cache/doc/sphinx/tutorial/vcl.rst	2010-09-22 11:31:55 UTC (rev 5260)
+++ branches/2.1/varnish-cache/doc/sphinx/tutorial/vcl.rst	2010-09-22 11:49:51 UTC (rev 5261)
@@ -1,45 +1,28 @@
 Varnish Configuration Language - VCL
 -------------------------------------
 
-Varnish has a really neat configuration system. Most other systems use
-configuration directives, where you basically turn on and off a bunch
-of switches. 
+Varnish has a great configuration system. Most other systems use
+configuration directives, where you basically turn on and off lots of
+switches. Varnish uses a domain specific language called Varnish
+Configuration Language, or VCL for short. Varnish translates this
+configuration into binary code which is then executed when requests
+arrive.
 
-A very common thing to do in Varnish is to override the cache headers
-from our backend. Lets see how this looks in Squid, which has a
-standard configuration.::
+The VCL files are divided into subroutines. The different subroutines
+are executed at different times. One is executed when we get the
+request, another when files are fetched from the backend server.
 
-	 refresh_pattern ^http://images.   3600   20%     7200
-	 refresh_pattern -i (/cgi-bin/|\?)    0    0%        0
-	 refresh_pattern -i (/\.jpg)       1800   10%     3600 override-expire 
-	 refresh_pattern .                    0   20%     4320
-
-If you are familiar with squid that probably made sense to you. But
-lets point out a few weaknesses with this model.
-
-1) It's not intuitive. You can guess what the options mean, and you
-   can (and should) document it in your configuration file.
-
-2) Which rules have precedence? Does the last rule to match stick? Or
-   the first? Or does Squid try to combine all the matching rules. I
-   actually don't know. 
-
-Now enter Varnish. Varnish takes your configuration file and
-translates it to C code, then runs it through a compiler and loads
-it. When requests come along varnish just executes the relevant
-subroutines of the configuration at the relevant times.
-
 Varnish will execute these subroutines of code at different stages of
-its work. Since its code it's execute line by line and precedence
+its work. Because it is code it is execute line by line precedence
 isn't a problem. At some point you call an action in this subroutine
-and then the execution of the subroutine stops. 
+and then the execution of the subroutine stops.
 
 If you don't call an action in your subroutine and it reaches the end
-Varnish will execute some built in code as well. We discuss this in
-XXX: Appendix A - the builtin VCL.
+Varnish will execute some built in VCL code. You will see this VCL
+code commented out in default.vcl.
 
 99% of all the changes you'll need to do will be done in two of these
-subroutines.
+subroutines. vcl_recv and vcl_fetch.
 
 vcl_recv
 ~~~~~~~~


Property changes on: branches/2.1/varnish-cache/include/vct.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/include/vct.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/include/vct.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/include/vev.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/include/vev.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/include/vev.h:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/lib/libvarnish/tcp.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/lib/libvarnish/tcp.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/lib/libvarnish/tcp.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/lib/libvarnish/vev.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/lib/libvarnish/vev.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/lib/libvarnish/vev.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170


Property changes on: branches/2.1/varnish-cache/lib/libvcl/vcc_dir_random.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/varnish-cache/lib/libvcl/vcc_dir_random.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4859-4861,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170
   + /trunk/varnish-cache/lib/libvcl/vcc_dir_random.c:4637,4643-4650,4654-4670,4686,4689-4690,4696-4702,4706,4712,4715-4719,4729-4731,4747,4749-4750,4754,4757-4758,4762,4781-4787,4789-4790,4792-4793,4810,4818,4823,4826,4828-4829,4842,4852-4853,4856,4858-4862,4864-4868,4912,4967-4968,4971,4973-4975,4977,4979-4981,4986,4989,5016,5048,5162,5170




More information about the varnish-commit mailing list