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
7b5f5405
Commit
7b5f5405
authored
Mar 20, 2014
by
Per Buer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove saint mode.
parent
1a25542f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
45 deletions
+0
-45
vcl-saint-and-grace.rst
doc/sphinx/users-guide/vcl-saint-and-grace.rst
+0
-45
No files found.
doc/sphinx/users-guide/vcl-saint-and-grace.rst
View file @
7b5f5405
...
@@ -56,48 +56,3 @@ So, to sum up, grace mode solves two problems:
...
@@ -56,48 +56,3 @@ So, to sum up, grace mode solves two problems:
* it serves stale content to avoid request pile-up.
* it serves stale content to avoid request pile-up.
* it serves stale content if the backend is not healthy.
* it serves stale content if the backend is not healthy.
Saint mode
~~~~~~~~~~
Sometimes servers get flaky. They start throwing out random
errors. You can instruct Varnish to try to handle this in a
more-than-graceful way - enter *Saint mode*. Saint mode enables you to
discard a certain page from one backend server and either try another
server or serve stale content from cache. Lets have a look at how this
can be enabled in VCL::
sub vcl_fetch {
if (beresp.status == 500) {
set beresp.saintmode = 10s;
return(restart);
}
set beresp.grace = 5m;
}
When we set beresp.saintmode to 10 seconds Varnish will not ask *that*
server for URL for 10 seconds. A blacklist, more or less. Also a
restart is performed so if you have other backends capable of serving
that content Varnish will try those. When you are out of backends
Varnish will serve the content from its stale cache.
This can really be a life saver.
Known limitations on grace- and saint mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If your request fails while it is being fetched you're thrown into
vcl_error. vcl_error has access to a rather limited set of data so you
can't enable saint mode or grace mode here. This will be addressed in a
future release but a work-around available.
* Declare a backend that is always sick.
* Set a magic marker in vcl_error
* Restart the transaction
* Note the magic marker in vcl_recv and set the backend to the one mentioned
* Varnish will now serve stale data is any is available
God mode
~~~~~~~~
Not implemented yet. :-)
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