-
1. Re: eviction, clustering without cacheloader
manik May 2, 2008 12:03 PM (in response to nnnnn)Try using an ExpirationPolicy? Then as long as you have sync clocks between the servers they would all be evicted at the same time. Of course, you don't get the benefits of the other policies that way.
-
2. Re: eviction, clustering without cacheloader
nnnnn May 2, 2008 12:40 PM (in response to nnnnn)Hmmm. Probably won't quite work for us - we need the timeToLiveSeconds behavior in LRU policy. To mimic that, we'd need to set a new ExpirationPolicy time on every get, which would kill performance (due to replication).
One thing that I'm thinking is adding a ClusteredCacheLoader. So if one server evicts too soon (due to node having been read on a different server recently), the ClusteredCacheLoader will get it from the other cache. When a node is evicted on all servers in the cluster, then it's when we really wanted to evict.
Does that sound like it might work? Question about ClusteredCacheLoader, since I've never used it. If we've got 4 servers in the cluster, and a node has been evicted from 3 of them, are we okay? Does the ClusteredCacheLoader search all other servers in the cluster until it finds the node? -
3. Re: eviction, clustering without cacheloader
manik May 2, 2008 1:17 PM (in response to nnnnn)"nnnnn" wrote:
Does that sound like it might work? Question about ClusteredCacheLoader, since I've never used it. If we've got 4 servers in the cluster, and a node has been evicted from 3 of them, are we okay? Does the ClusteredCacheLoader search all other servers in the cluster until it finds the node?
I'm not sure if it will work, it really depends on the details of your use case. :-) I'd say give it a go though.
Regarding searching all nodes, yes it does. It broadcasts a clustered get call, and then filters the results using a response filter (see the inner class, ResponseValidityFilter on the ClusteredCacheLoader).