Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
b394df60
Commit
b394df60
authored
Feb 28, 2011
by
Bjoern Ruberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typos and add link
parent
856d6068
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
increasing_your_hitrate.rst
doc/sphinx/tutorial/increasing_your_hitrate.rst
+10
-7
No files found.
doc/sphinx/tutorial/increasing_your_hitrate.rst
View file @
b394df60
...
@@ -11,13 +11,13 @@ to get a high hit rate in Varnish.
...
@@ -11,13 +11,13 @@ to get a high hit rate in Varnish.
Varnish will not cache your data unless it's absolutely sure it is
Varnish will not cache your data unless it's absolutely sure it is
safe to do so. So, for you to understand how Varnish decides if and
safe to do so. So, for you to understand how Varnish decides if and
how to cache a page I'll guide you through a couple of tools that you
how to cache a page
,
I'll guide you through a couple of tools that you
will find useful.
will find useful.
Note that you need a tool to see what HTTP headers fly between you and
Note that you need a tool to see what HTTP headers fly between you and
the web server.
If you have Varnish the easiest is to use varnishlog
the web server.
On the Varnish server, the easiest is to use
and varnishtop but sometimes a client-side tool makes sense. Here are
varnishlog and varnishtop but sometimes a client-side tool makes
the ones I use.
sense. Here are
the ones I use.
Tool: varnishtop
Tool: varnishtop
~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
...
@@ -35,6 +35,9 @@ backend you can use varnishlog to have a look at the whole request.
...
@@ -35,6 +35,9 @@ backend you can use varnishlog to have a look at the whole request.
``varnishlog -c -o /foo/bar`` will give the whole (-o) requests coming
``varnishlog -c -o /foo/bar`` will give the whole (-o) requests coming
from the client (-c) matching /foo/bar.
from the client (-c) matching /foo/bar.
For extended diagnostics headers, see
http://www.varnish-cache.org/trac/wiki/VCLExampleHitMissHeader
Tool: lwp-request
Tool: lwp-request
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
...
@@ -64,7 +67,7 @@ Headers. Let's send a GET request for their home page::
...
@@ -64,7 +67,7 @@ Headers. Let's send a GET request for their home page::
X-VG-WebCache: joanie
X-VG-WebCache: joanie
X-VG-WebServer: leon
X-VG-WebServer: leon
OK. Let me explain what it does. GET usually send off HTTP 0.9
OK. Let me explain what it does. GET usually send
s
off HTTP 0.9
requests, which lack the Host header. So I add a Host header with the
requests, which lack the Host header. So I add a Host header with the
-H option. -U print request headers, -s prints response status, -e
-H option. -U print request headers, -s prints response status, -e
prints response headers and -d discards the actual content. We don't
prints response headers and -d discards the actual content. We don't
...
@@ -116,7 +119,7 @@ for an object.
...
@@ -116,7 +119,7 @@ for an object.
"Cache-Control: nocache" is ignored but if you need this you can
"Cache-Control: nocache" is ignored but if you need this you can
easily add support for it.
easily add support for it.
So make sure
use
issue a Cache-Control header with a max-age
So make sure
you
issue a Cache-Control header with a max-age
header. You can have a look at what Varnish Software's drupal server
header. You can have a look at what Varnish Software's drupal server
issues::
issues::
...
@@ -134,7 +137,7 @@ kept inside Varnish. You can grep out Age from varnishlog like this::
...
@@ -134,7 +137,7 @@ kept inside Varnish. You can grep out Age from varnishlog like this::
Pragma
Pragma
~~~~~~
~~~~~~
HTTP 1.0 server might send "Pragma: nocache". Varnish ignores this
An
HTTP 1.0 server might send "Pragma: nocache". Varnish ignores this
header. You could easily add support for this header in VCL.
header. You could easily add support for this header in VCL.
In vcl_fetch::
In vcl_fetch::
...
...
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