Using Varnish and the redis vmod without a backend
Andy Fase
andy at eventbase.com
Thu Nov 20 06:56:38 CET 2014
Hi There,
I'm hoping to get round a backed API bottleneck by using the redis vmod to
allow me to process some API calls very quickly with just the use of
Varnish and Redis via the redis vmod (there quite simple API calls). The
request would come in, Varnish looks some stuff up in redis - or sends some
stuff to redis and then reply with a JSON response. Its a heavily hit API
so I would rather not involve the backend webservices at all as they
basically cannot handle the load.
All good (I believe?) - however I was intending to do the REDIS work in
vcl_deliver and then synthesize a JSON response - but there appears to be
no way of getting from vcl_recv into vcl_deliver directly - so the only
"hack" I can think or is going via vcl_error via a "error" command with
some made up error code I then have to look for in vcl_error.
Is there any other / better way of doing this?
Thanks in advance
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20141119/ad39a02a/attachment.html>
More information about the varnish-misc
mailing list