Using Varnish and the redis vmod without a backend

Thomas Lecomte thomas.lecomte at virtual-expo.com
Thu Nov 20 07:35:17 CET 2014


On Wed, Nov 19, 2014 at 09:56:38PM -0800, Andy Fase wrote:
> Is there any other / better way of doing this?

Hello Any,

Indeed, you can't go directly from vcl_recv to vcl_deliver.
Using vcl_error will work, however vcl_error sets a Connection: close
header which will degrade performances a lot if a single client makes
multiple calls to the API.

I think a workaround could be to use a fake cached object using a static
hash, and then rewriting the response in vcl_deliver with the actual
JSON.

Never done that though - just an idea.

Regards,

-- 
Thomas Lecomte / Administrateur Système & Réseau
+33 4 86 13 48 65 / Virtual Expo / Marseille



More information about the varnish-misc mailing list