About the vmod?

Andrea Campi andrea.campi at zephirworks.com
Fri Jul 8 10:38:44 CEST 2011


On Fri, Jul 8, 2011 at 9:06 AM, 姚伟斌 <nbubingo at gmail.com> wrote:
> Hi folks,
> I'm a freshman with the varnish and glad to see that the varnish3.0 support
> vmod.
> I want to develop a module to dispatch request to a certain backend server.
> The dispatch strategy is neither round robin or random. Is there anyway to
> develop such a director module?

Not currently. vmod's can define subroutines you can call from VCL,
and that's pretty much in.
To add a director strategy you need to hack source code directly.

> I have also noticed that the vmod are like callback functions.  Is there any
> good way to do some configure work before start varnish?

Your vmod can define an init function which will be called when your
vmod is loaded. Look at the documentation and at existing modules.


More information about the varnish-dev mailing list