r5035 - in trunk/varnish-cache/doc/sphinx: . tutorial

perbu at varnish-cache.org perbu at varnish-cache.org
Thu Jul 8 10:03:29 CEST 2010


Author: perbu
Date: 2010-07-08 10:03:28 +0200 (Thu, 08 Jul 2010)
New Revision: 5035

Modified:
   trunk/varnish-cache/doc/sphinx/index.rst
   trunk/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst
   trunk/varnish-cache/doc/sphinx/tutorial/index.rst
   trunk/varnish-cache/doc/sphinx/tutorial/sizing_your_cache.rst
Log:
typos, minor fixes.



Modified: trunk/varnish-cache/doc/sphinx/index.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/index.rst	2010-07-07 15:11:33 UTC (rev 5034)
+++ trunk/varnish-cache/doc/sphinx/index.rst	2010-07-08 08:03:28 UTC (rev 5035)
@@ -32,4 +32,4 @@
 * :ref:`search`
 
 
-`$Id:$`
+$Id: $

Modified: trunk/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst	2010-07-07 15:11:33 UTC (rev 5034)
+++ trunk/varnish-cache/doc/sphinx/tutorial/increasing_your_hitrate.rst	2010-07-08 08:03:28 UTC (rev 5035)
@@ -7,8 +7,13 @@
 application through Varnish. Unless your application is specifically
 written to work behind a web accelerator you'll probably need to do
 some changes to either the configuration or the application in order
-to get a high hitrate in Varnish.
+to get a high hit rate in Varnish.
 
+Varnish will not cache your data unless it's absolutely sure it is
+safe to do so. So, for you to understand how Varnish decides if and
+how to cache a page I'll guide you through a couple of tools that you
+will find useful.
+
 Note that you need a tool to see what HTTP headers fly between you and
 the web server. If you have Varnish the easiest is to use varnishlog
 and varnishtop but sometimes a client-side tool makes sense. Here are
@@ -202,8 +207,8 @@
 HTTP object Vary. This makes a lot of sense with headers like
 Accept-Encoding. When a server issues a "Vary: Accept-Encoding" it
 tells Varnish that its needs to cache a separate version for every
-different Accept-Encoding that is comming from the clients. So, if a
-clients only accepts gzip encoding Varnish wont't serve the version of
+different Accept-Encoding that is coming from the clients. So, if a
+clients only accepts gzip encoding Varnish won't serve the version of
 the page encoded with the deflate encoding.
 
 The problem is that the Accept-Encoding field contains a lot of
@@ -213,7 +218,7 @@
 
 And another one sends::
 
-  Accept-Encoding:: deflate, gzip
+  Accept-Encoding:: deflate,gzip
 
 Varnish will keep two variants of the page requested due to the
 different Accept-Encoding headers. Normalizing the accept-encoding
@@ -245,9 +250,12 @@
 for every variation of User-Agent there is. There are plenty. Even a
 single patchlevel of the same browser will generate at least 10
 different User-Agent headers based just on what operating system they
-are running. So if you need to Vary based on User-Agent be sure to
-normalize the header or your hit rate will suffer badly.
+are running. 
 
+So if you *really* need to Vary based on User-Agent be sure to
+normalize the header or your hit rate will suffer badly. Use the above
+code as a template.
+
 .. _tutorial-increasing_your_hitrate-pragma:
 
 Pragma
@@ -278,8 +286,8 @@
 http://varnish-software.com and http://varnishsoftware.com/ all point
 at the same site. Since Varnish doesn't know they are different
 Varnish will cache different versions of every page for every
-hostname. You can mitigate this in your web server config by setting
-up redirects or by useing the following VCL:::
+hostname. You can mitigate this in your web server configuration by setting
+up redirects or by using the following VCL:::
 
   if (req.http.host ~ "^(www.)?varnish-?software.com") {
     set req.http.host = "varnish-software.com";

Modified: trunk/varnish-cache/doc/sphinx/tutorial/index.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/tutorial/index.rst	2010-07-07 15:11:33 UTC (rev 5034)
+++ trunk/varnish-cache/doc/sphinx/tutorial/index.rst	2010-07-08 08:03:28 UTC (rev 5035)
@@ -20,8 +20,6 @@
 
 Good luck.
 
-perbu.
-
 .. toctree:: 
 
 	backend_servers.rst

Modified: trunk/varnish-cache/doc/sphinx/tutorial/sizing_your_cache.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/tutorial/sizing_your_cache.rst	2010-07-07 15:11:33 UTC (rev 5034)
+++ trunk/varnish-cache/doc/sphinx/tutorial/sizing_your_cache.rst	2010-07-08 08:03:28 UTC (rev 5035)
@@ -12,5 +12,6 @@
    they are cheap to serve from the backend and you have a limited
    amount of memory.
  * Watch the n_lru_nuked counter with varnishstat or some other
-   tool. If you have a lot of LRU activity then you should consider
-   increasing the size of the cache.
+   tool. If you have a lot of LRU activity then your cache is evicting
+   objects due to space constraints and you should consider increasing
+   the size of the cache.




More information about the varnish-commit mailing list