[Varnish] #385: Pluggable cache engines

Varnish varnish-bugs at projects.linpro.no
Sat Nov 22 08:51:43 CET 2008

#385: Pluggable cache engines
 Reporter:  eugaia       |       Owner:  phk  
     Type:  enhancement  |      Status:  new  
 Priority:  lowest       |   Milestone:       
Component:  varnishd     |     Version:  trunk
 Severity:  minor        |    Keywords:       
 Has anyone thought about the idea of pluggable cache engines, in the same
 way that MySQL (5.1+) has pluggable storage engines?

 The idea I have is for you to be able to choose a caching engine as part
 of the settings in VCL, so that you could use the current method (i.e.
 virtual memory file, hashing, buckets etc), or another method.

 One other possible type of engine I've thought of (and will be
 implementing using the C{ }C inclusion method in VCL - a fantastically
 good idea btw) is to use a MySQL storage plugin which opens up a high-
 speed socket to a cache file table.  The code that I'll include in the VCL
 would then access that socket to retrieve / write cache data.

 There might be particular advantages of this method of storing cache data,
 e.g. persistence, ability to access the cache files via a database,
 scalability, clustering etc.  Other caching engines/protocols could be
 developed, perhaps based on specific needs, and an 'ideal' solution might
 involve more than one caching engine.

 By opening up the caching engine, and by having a setting like:

 engine cache1 {
   .type = MyCache;
   .socket = "/tmp/mycache.sock";

 set req.engine = cache1;

 it would facilitate such a feature and would (I believe) be a valuable
 addition to the architecture of Varnish.

Ticket URL: <http://varnish.projects.linpro.no/ticket/385>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list