Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
d6755fff
Commit
d6755fff
authored
Sep 03, 2014
by
Federico G. Schwindt
Committed by
Lasse Karstensen
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve examples and reduce duplicated information
parent
a613f494
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
38 deletions
+22
-38
vcl.rst
doc/sphinx/reference/vcl.rst
+2
-0
vcl-backends.rst
doc/sphinx/users-guide/vcl-backends.rst
+20
-38
No files found.
doc/sphinx/reference/vcl.rst
View file @
d6755fff
...
...
@@ -213,6 +213,8 @@ are available:
Backends can be used with *directors*. Please see the
vmod_directors(3) man page for more information.
.. _reference-vcl_probes:
Probes
------
...
...
doc/sphinx/users-guide/vcl-backends.rst
View file @
d6755fff
...
...
@@ -156,14 +156,14 @@ Health checks
-------------
Lets set up a director with two backends and health checks. First let
us define the backends
.
::
us define the backends::
backend server1 {
.host = "server1.example.com";
.probe = {
.url = "/";
.timeout = 1s;
.interval = 5s;
.timeout = 1 s;
.window = 5;
.threshold = 3;
}
...
...
@@ -173,40 +173,23 @@ us define the backends.::
.host = "server2.example.com";
.probe = {
.url = "/";
.timeout = 1s;
.interval = 5s;
.timeout = 1 s;
.window = 5;
.threshold = 3;
}
}
What is new here is the ``probe``. Varnish will check the health of each
backend with a probe. The options are:
url
The URL Varnish will use to send a probe request.
interval
How often should we poll.
timeout
What is the timeout of the probe.
window
Varnish will retain up to this many probes when considering backend health.
threshold
How many of the `.window` last polls must be good for the backend to be
declared healthy.
initial
How many of the probes that needs to be succesful when Varnish starts.
Defaults to the same amount as the threshold.
What is new here is the ``probe``. In this example Varnish will check the
health of each backend every 5 seconds, timing out after 1 second. Each
poll will send a GET request to /. If 3 out of the last 5 polls succeeded
the backend is considered healthy, otherwise it will be marked as sick.
Refer to the :ref:`reference-vcl_probes` section in the
:ref:`reference-vcl` documentation for more information.
Now we define the 'director'::
import directors;
sub vcl_init {
...
...
@@ -215,17 +198,16 @@ Now we define the 'director'::
vdir.add_backend(server2);
}
You use this `vdir` director as a backend_hint for requests, just like
you would with a simple backend. Varnish will not send traffic to hosts
that are marked as unhealthy.
You use this `vdir` director as a backend_hint for requests, just like you would
with a simple backend. Varnish will not send traffic to hosts that are marked as
unhealthy.
Varnish can also serve stale content if all the backends are
down. See :ref:`users-guide-handling_misbehaving_servers` for more
information on how to enable this.
Please note that Varnish will keep health probes running for all loaded VCLs. Varnish
will coalesce probes that seem identical - so be careful not to change the
probe config if you do a lot of VCL loading. Unloading the VCL will discard the
probes. For more information on how to do this please see ref:`reference-vcl-director`.
Varnish can also serve stale content if all the backends are down. See
:ref:`users-guide-handling_misbehaving_servers` for more information on
how to enable this.
Please note that Varnish will keep health probes running for all loaded
VCLs. Varnish will coalesce probes that seem identical - so be careful
not to change the probe config if you do a lot of VCL loading. Unloading
the VCL will discard the probes. For more information on how to do this
please see ref:`reference-vcl-director`.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment