3 ms·
Inline C can offer more than just simple extensions. I've extended Varnish 2.1.* to include a custom authentication layer that basically means I can drop multi
by buro9 15y ago
Inline C can offer more than just simple extensions.
I've extended Varnish 2.1.* to include a custom authentication layer that basically means I can drop multiple different applications behind Varnish and have the equivalent of a Web Account (of the ilk of Google Account, Yahoo Account, etc).
The functions provided by the shared library I've written require a whole load of VCL to grab hold of parts of the cookie and to pass things into the functions, before then handling the return values and re-writing headers (that the backend servers then look for).
It all works really well, and I haven't found VCL to be an ugly domain specific language to work with, especially when you consider that it translates directly to C which is then compiled.
When I think of what it took to write an Nginx mod, VCL with Inline C is a dream.
- StavrosK 15y agoAh, the infamous second single sign-on system! I was going to send you this link, good thing you saw it. I'm very excited about the prospect of a Lua Varnish module, I think it would make this sort of hackery (writing server modules directly for various tasks) much easier.