r3554 - branches/2.0/varnish-cache/man

tfheen at projects.linpro.no tfheen at projects.linpro.no
Wed Jan 28 13:22:58 CET 2009


Author: tfheen
Date: 2009-01-28 13:22:58 +0100 (Wed, 28 Jan 2009)
New Revision: 3554

Modified:
   branches/2.0/varnish-cache/man/vcl.7so
Log:
Merge r3402:

Document grace

Thanks to perbu for suggested documentation
Fixes 355



Modified: branches/2.0/varnish-cache/man/vcl.7so
===================================================================
--- branches/2.0/varnish-cache/man/vcl.7so	2009-01-28 12:18:10 UTC (rev 3553)
+++ branches/2.0/varnish-cache/man/vcl.7so	2009-01-28 12:22:58 UTC (rev 3554)
@@ -186,6 +186,24 @@
     pipe;
 }
 .Ed
+.Ss Grace 
+If the backend takes a long time to generate an object there is a risk
+of a thread pile up.
+In order to prevent this you can enable grace.
+This allows varnish to serve an expired version of the object while a
+fresh object is being generated by the backend.
+.Pp
+The following vcl code will make Varnish serve expired objects.
+All object will be kept up to two minutes past their expiration time
+or a fresh object is generated.
+.Bd -literal -offset 4n
+sub vcl_recv {
+    set req.grace = 2m;
+}
+sub vcl_fetch {
+    set obj.grace = 2m;
+}
+.Ed
 .Ss Functions
 The following built-in functions are available:
 .Bl -tag -width indent



More information about the varnish-commit mailing list