Thoughs on VMODs and VCL

Nils Goroll slink at
Tue May 6 08:39:16 CEST 2014

Hi Federico,

I must say I don't understand the first part of your email about the delete
keyword and what you intend to express about calling vmod methods.

On 06/05/14 03:43, Federico Schwindt wrote:

> Currently this is done manually using ctx->req->sp->fd as an index to a malloc'd
> list. The other option is to use thread-specific data but I was explained this
> won't work over waitinglist'd requests. Both of these approaches only work for
> single states btw.
> A PRIV_REQ type will solve single state cases and has the extra benefit of
> somewhat automatic clean up when the request is done.
> Thoughts?

This has got a long-standing vote from me too, the request lives here: :

  * array indexed by vmod id (for those using the state) hanging off session,
request and busy obj
  * VMOD needs to define free callback - same as now
  * free will be called at the end of req/session
  * where to allocate memory from?
    * session: malloc or own pool
    * request: get from {{{req->ws}}}, no free required then

More information about the varnish-dev mailing list