multiple pools in Java

Greg Whalin gwhalin at meetup.com
Wed Jun 1 12:19:59 PDT 2005


Kevin Burton wrote:
> Mybrid Spalding wrote:
> 
>> Hi!
>>  Greetings from a first-time poster. I'm currently using the Java 
>> client to connect to memcached. For robustness reasons I'm thinking of 
>> segementing traffic to different caches. That way if one cache pool 
>> goes down I can route to another. However, reading the Java docs its 
>> not obvious to me how to or a good strategy.
> 
> 
> Actually this is a standing problem in my mind.
> The java memcached implementation is a singleton.  There's no way to 
> have two sets of memcached servers.
> This can be used for namespacing.  Certain types of cache data might 
> want to have different policies.  For example if one logical cache has 
> few updates but is very expensive to fetch from teh original source you 
> might want to keep it around FOREVER.  However if you have a secondary 
> cache which is active it will push out the first cache (assuming you're 
> on the same box).
> 
> The java-memcached client could easily be updated - maybe like a 5 line 
> patch - to fix this.  Problem.  The existing API could also be preserved 
> and users could just assume its the "default pool"...
> 
> Greg... did you ever get around to putting memcached into CVS :)
> 
> Kevin
> 


Already implemented in head source version (subversion).  Not very 
heavily tested at this point (hence not released), but was a small 
change and seemingly pretty straight forward.


More information about the memcached mailing list