[jboss-user] [JBossCache] - MySQL replication and JBoss Cache Pattern

nicpottier do-not-reply at jboss.com
Wed Oct 11 12:42:00 EDT 2006

I'm trying to build a highly available and scalable simple store using JBoss Cache backed by mySQL and I can't help but get the feeling that I'm reinventing a wheel that has no doubt been built before.

My requirements are:
 * high availability - a single box dying will not cause loss of data (minutes of data loss is ok however)
 * ~linear scalability - speed of gets can scale linearly with the # of cache nodes
 * it's ok for puts to be bound by DB

My current thinking is to use JBossCache in a 'buddy' mode, backed by 2+ MySql nodes replication to each other.  The cache boxes would be dedicated for caching and accessed via a simple client API.

The client would hash it's 'key' and connect to the same cache node when doing puts and gets on the same key.  Writes would write through to the MySQL DB, which would then replicate to one or more others.

In the event of a node going down (with it's MySQL DB) then the client would detect this (or a load balancer would) and new requests would go to another Node.  In theory, one of the 'buddies' should have the data available for fast lookup, but worst case it could come from the replicated DB.

Does this sound sane?  How have others combined a replicated MySQL DB with JBoss Cache to atain these goals?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977619#3977619

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977619

More information about the jboss-user mailing list