varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

Move curl vmod into this collection #46

Closed andrerom closed 7 years ago

andrerom commented 7 years ago

Would be useful to be able to cleanly do curl calls with this collection on varnish itself for hash lookups relevant to a request.

dridi commented 7 years ago

Hi,

It would conflict with the first non-goal from the README:

Expressed non-goals are:

  • Import vmods that require external libraries, like curl or geoip. This collection should be simple and maintenance free to run.

Dridi

andrerom commented 7 years ago

Ok, makes sense, overlooked that part.

Other ways we could expose a way to do cached sub requests in VCL? Context: We (eZ & FOSHttpCache lib) currently use restart but were told by a Varnish employee we should rather use curl so VCL is easier to comprehend, however we rather not as long as it implies installing from source, varnish-modules was a promising direction for things like this.

gquintard commented 7 years ago

I was probably the one saying that :-)

Using curl would indeed increase readability, but I realized afterwards the benefit of using restart: you get to cache authorizations.

I still think there's a better way, possibly using vcl labels. Would you mind sending an email to varbilnsh-misc, linking the currently used vcl, so we can have a look at and discuss it together?