Dynamically adjust backend weights based on a http response from the backend
Since VC 7.7, vmodtool.py generates a file that must be taken into account in Makefile.am https://varnish-cache.org/docs/trunk/whats-new/upgrading-7.7.html |
||
|---|---|---|
| contrib | ||
| src | ||
| .gitignore | ||
| .travis.yml | ||
| bootstrap | ||
| CHANGES.rst | ||
| configure.ac | ||
| INSTALL.rst | ||
| LICENSE | ||
| Makefile.am | ||
| README.rst | ||
.. role:: ref(emphasis)
=================
vmod_weightadjust
=================
----------------------------------------------
random director with runtime adjustable weight
----------------------------------------------
:Manual section: 3
DESCRIPTION
===========
Random director with dynamic weight update based on http requests to
backends.
Example:
::
vcl_init {
new director = random();
director.add_backend(backend,
weight=1.1,
weight_update="^X-Weight: *(\d+\.\d+)",
url="/get-weight.php");
# ...
}
See vmod documentation/man page for details.
INSTALLATION
============
See `INSTALL.rst <INSTALL.rst>`_ in the source repository.