Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
47dc9d9e
Commit
47dc9d9e
authored
Feb 19, 2013
by
Per Buer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge intro / TOC
parent
fbc9e698
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
34 deletions
+24
-34
vcl-intro.rst
doc/sphinx/users-guide/vcl-intro.rst
+0
-30
vcl.rst
doc/sphinx/users-guide/vcl.rst
+24
-4
No files found.
doc/sphinx/users-guide/vcl-intro.rst
deleted
100644 → 0
View file @
fbc9e698
Varnish Configuration Language - VCL
-------------------------------------
Varnish has a great configuration system. Most other systems use
configuration directives, where you basically turn on and off lots of
switches. Varnish uses a domain specific language called Varnish
Configuration Language, or VCL for short. Varnish translates this
configuration into binary code which is then executed when requests
arrive.
The VCL files are divided into subroutines. The different subroutines
are executed at different times. One is executed when we get the
request, another when files are fetched from the backend server.
Varnish will execute these subroutines of code at different stages of
its work. Because it is code it is execute line by line precedence
isn't a problem. At some point you call an action in this subroutine
and then the execution of the subroutine stops.
If you don't call an action in your subroutine and it reaches the end
Varnish will execute some built in VCL code. You will see this VCL
code commented out in default.vcl.
99% of all the changes you'll need to do will be done in two of these
subroutines. *vcl_recv* and *vcl_fetch*.
.. _users-guide-vcl_fetch_actions:
doc/sphinx/users-guide/vcl.rst
View file @
47dc9d9e
VCL
VCL
- Varnish Configuration Language
---
---
---------------------------------
Varnish has a great configuration system. Most other systems use
configuration directives, where you basically turn on and off lots of
switches. Varnish uses a domain specific language called Varnish
Configuration Language, or VCL for short.
Yes. Is great. Ja.
Every inbound request flows through Varnish and you can influence how
the request is being handled by altering the VCL code. You can direct
certain requests to certains backends, you can alter the requests and
the responses or have Varnish take various actions depending on
arbitrary properties of the request or the response. This makes
Varnish an extremly powerful HTTP processor, not just for caching.
Varnish translates VCL into binary code which is then executed when
requests arrive. The performance impact of VCL is negligible.
The VCL files are organized into subroutines. The different subroutines
are executed at different times. One is executed when we get the
request, another when files are fetched from the backend server.
If you don't call an action in your subroutine and it reaches the end
Varnish will execute some built in VCL code. You will see this VCL
code commented out in default.vcl that ships with Varnish Cache.
.. _users-guide-vcl_fetch_actions:
.. toctree::
.. toctree::
:maxdepth: 2
:maxdepth: 2
vcl-intro
vcl-syntax
vcl-syntax
vcl-built-in-subs
vcl-built-in-subs
vcl-variables
vcl-variables
...
...
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