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
5ef8de8c
Commit
5ef8de8c
authored
Feb 21, 2014
by
Per Buer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4.0 updates to vcl + language
parent
df8c0544
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
vcl-backends.rst
doc/sphinx/users-guide/vcl-backends.rst
+20
-15
No files found.
doc/sphinx/users-guide/vcl-backends.rst
View file @
5ef8de8c
...
...
@@ -115,8 +115,14 @@ Directors
You can also group several backend into a group of backends. These
groups are called directors. This will give you increased performance
and resilience. You can define several backends and group them
together in a director.::
and resilience.
You can define several backends and group them together in a
director. This requires you to load a VMOD, a Varnish module, and then to
call certain actions in vcl_init.::
import directors; # load the directors
backend server1 {
.host = "192.168.0.10";
...
...
@@ -125,24 +131,21 @@ together in a director.::
.host = "192.168.0.10";
}
Now we create the director.::
director example_director round-robin {
{
.backend = server1;
sub vcl_init {
new bar = directors.round_robin();
bar.add_backend(server1);
bar.add_backend(server2);
}
# server2
{
.backend = server2;
}
# foo
sub vcl_recv {
# send all traffic to the bar director:
req.backend = bar.backend;
}
This director is a round-robin director. This means the director will
distribute the incoming requests on a round-robin basis. There is
also a *random* director which distributes requests in a, you guessed
it, random fashion.
it, random fashion.
But what if one of your servers goes down? Can Varnish direct all the
requests to the healthy server? Sure it can. This is where the Health
...
...
@@ -202,7 +205,9 @@ initial
Now we define the director.::
director example_director round-robin {
import directors;
director example_director round-robin {
{
.backend = server1;
}
...
...
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