multiple pools in Java
burton at rojo.com
Wed Jun 1 11:01:29 PDT 2005
Mybrid Spalding wrote:
> 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 :)
Use Rojo (RSS/Atom aggregator)! - visit http://rojo.com.
See irc.freenode.net #rojo if you want to chat.
Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
Kevin A. Burton, Location - San Francisco, CA
AIM/YIM - sfburtonator, Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
More information about the memcached