Dynamically adjust backend weights based on a http response from the backend
Find a file
Thibaut Artis e792e0099b Handle src/vmod_vcs_version.txt
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
2025-05-23 17:38:05 +02:00
contrib add an example php script to output the server weight 2019-03-26 14:11:16 +01:00
src Handle src/vmod_vcs_version.txt 2025-05-23 17:38:05 +02:00
.gitignore Handle src/vmod_vcs_version.txt 2025-05-23 17:38:05 +02:00
.travis.yml a github tarball is not a dist 2017-09-18 17:12:44 +02:00
bootstrap Migrate to VCDK 2025-05-23 17:38:05 +02:00
CHANGES.rst Automatic rename of libvmod-example to libvmod-weightadjust. 2017-09-28 07:52:28 +02:00
configure.ac Migrate to VCDK 2025-05-23 17:38:05 +02:00
INSTALL.rst Migrate to VCDK 2025-05-23 17:38:05 +02:00
LICENSE Standardize LICENSE 2022-12-01 16:25:54 +01:00
Makefile.am Migrate to VCDK 2025-05-23 17:38:05 +02:00
README.rst Migrate to VCDK 2025-05-23 17:38:05 +02:00

.. 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.