HEX
Server: Apache/2.4.65 (Unix) OpenSSL/1.1.1k
System: Linux srv820.techno-vate.net 4.18.0-553.109.1.el8_10.x86_64 #1 SMP Mon Mar 2 09:33:18 EST 2026 x86_64
User: bheot (1024)
PHP: 8.1.30
Disabled: NONE
Upload Files
File: //usr/share/doc/varnish/html/reference/states.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Varnish Processing States &mdash; Varnish version 6.4.0 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '6.4.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Varnish version 6.4.0 documentation" href="../index.html" />
    <link rel="up" title="The Varnish Reference Manual" href="index.html" />
    <link rel="next" title="varnish-cli" href="varnish-cli.html" />
    <link rel="prev" title="VCL" href="vcl.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="varnish-cli.html" title="varnish-cli"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="vcl.html" title="VCL"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Varnish version 6.4.0 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">The Varnish Reference Manual</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="varnish-processing-states">
<span id="reference-states"></span><h1>Varnish Processing States<a class="headerlink" href="#varnish-processing-states" title="Permalink to this headline">¶</a></h1>
<div class="section" id="introduction">
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>Varnish processing of client and backend requests is implemented as
state machines. Whenever a state is entered, a C function is called,
which in turn calls the appropriate Varnish core code functions to
process the request or response at this stage. For most states, core
code also calls into a state-specific function compiled from VCL, a
VCL subroutine (see <a class="reference internal" href="../users-guide/vcl-built-in-subs.html#vcl-built-in-subs"><em>Built in subroutines</em></a> ).</p>
<p>As a general guideline, core code aims to prepare objects accessible
from VCL with good defaults for the most common cases before calling
into the respective VCL subroutine. These can then be modified from
VCL where necessary.</p>
<p>The following graphs attempt to provide an overview over the
processing states, their transitions and the most relevant functions
in core code. They represent a compromise between usefulness for
core/VMOD developers and administrators and are intended to serve as
the reference basis for derivative work, such as more VCL-centric
views.</p>
</div>
<div class="section" id="client-side">
<h2>Client Side<a class="headerlink" href="#client-side" title="Permalink to this headline">¶</a></h2>
<img src="../_images/cache_req_fsm.svg" /></div>
<div class="section" id="backend-side">
<h2>Backend Side<a class="headerlink" href="#backend-side" title="Permalink to this headline">¶</a></h2>
<img src="../_images/cache_fetch.svg" /></div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Varnish Processing States</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#client-side">Client Side</a></li>
<li><a class="reference internal" href="#backend-side">Backend Side</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="vcl.html"
                        title="previous chapter">VCL</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="varnish-cli.html"
                        title="next chapter">varnish-cli</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/reference/states.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="varnish-cli.html" title="varnish-cli"
             >next</a> |</li>
        <li class="right" >
          <a href="vcl.html" title="VCL"
             >previous</a> |</li>
        <li><a href="../index.html">Varnish version 6.4.0 documentation</a> &raquo;</li>
          <li><a href="index.html" >The Varnish Reference Manual</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010-2014, Varnish Software AS.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>