Package: isotoma.recipe.varnish
Varnish buildout recipeThis package providesbuildoutrecipes for the configuration of varnish.  This
has a number of features and differences fromplone.recipe.varnish, but it
was inspired by that package.This version only supports varnish 3.x.This package also doesn’t provide all the features of plone.recipe.varnish,
since it’s designed to be used slightly differently.  Using this recipe you
have one varnish daemon per deployed backend application server.  If you have
three different applications on a server, you will run three varnish daemons.
This means they can be separately deployed, configured and maintained.  This
also means there is no need for host-header based routing.Note that this package provides no support forinstallingvarnish.  Use the
binary provided by your OS, or usezc.recipe.cmmiperhaps.The key differences are:This packages usesisotoma.recipe.gocaptainto write the start/stop scripts, so it’s more likely to play well with your OS and behaves more normallySupport for a separate logging system with each varnish instance, again using GoCaptainA different (and arguably more sane) basic varnish configurationEasy support for custom templatesConfiguration exampleA recipe for this package would look something like:[varnish]
recipe = isotoma.recipe.varnish
name = mysite
bind = 127.0.0.1:8080
backends = 127.0.0.1:9000
varnishlog = /usr/bin/varnishncsa
logfile = /var/log/varnish/mysite.logThis would create two start scripts in your bin directory: varnish and
varnishlog.  The log instance will only log activity for this varnish instance.Mandatory ParametersbindThe host:port to listen onbackendsA list of backends (note only one backend is currently supported with the default template, because some director code is required.  A custom template should work ok though, if you write one.)Optional ParametersnameThis identifies the individual varnish instance - see the -n option to varnishd. (required if you are using varnishlog and recommended even if not)cache-sizeThe size of the cache.connect-timeoutThe .connect_timeout option in the output VCLfirst-byte-timeoutThe .first_byte_timeout option in the output VCLbetween-bytes-timeoutThe .between_bytes_timeout in the output VCLdaemonThe path to the varnishd daemon (default /usr/sbin/varnishd)parametersAny other parameters to pass at runtime (without the -p)userThe user to run the daemon as (default nobody)groupThe group to run the daemon as (default nobody)verbose-headersIf you set this, you will get some very useful debugging headers in your HTTP output.templateThe path to the template to use, if you wish to provide a different one. It’s expected that this will be a Varnish 2.1 template.
If you try to use Varnish 2.0, isotoma.recipe.varnish will attempt to downgrade the template.log-include-regexInclude lines matching the specified regex in the log outputlog-exclude-regexExclude lines matching the specified regex from the log outputlog-include-tagInclude lines with the specified tag in the log outputlog-exclude-tagExclude lines with the specified tag from the log outputlogfileThe path to the logfile to write (required if varnishlog specified)varnishlogThe path to the varnishlog binary - you can use either varnishlog or varnishncsatelnetOffer a management interface on the specified address and port. (format: address:port)
Will generate a varnishadm wrapper in bin dir with the -T address:port already providedcachehtmlBy default HTML is explicitly excluded from being cached, to avoid various
broken configurations we’ve seen. If you really want to cache HTML pages, set
this to ‘on’LicenseCopyright 2010 Isotoma LimitedLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Changelog3.0.0 (2015-01-28)Version bump to support varnish 3.0.1.10 (2012-10-15)Fix problem with easy_install.install on some systems.0.1.9 (2012-02-03)Change handling of${buildout:run-directory}}so can cope with migrating
from deployments not using it.0.1.8 (2012-02-01)Add a new varnishctl wrapper that allows for graceful reload of varnish
configuration.To test a new VCL change without interrupting your site you can:varnishctl configtestTo load a new VCL change without disrupting your site you can:varnishctl graceful0.1.7 (2012-01-23)Add option to enable passthru headers0.1.6 (2012-01-23)Fix bug in previous change0.1.5 (2012-01-23)enabled switching of html caching with the ‘cachehtml’ option0.1.4 (2012-01-09)Provide a vcl_hash that doesn’t use the Host header0.1.3 (2011-09-01)Working varnishadm command0.1.2 (2011-08-26)Use ${:daemon} rather than assuming varnishd is on PATH.If there is a ${buildout:run-directory}, put pid files there