[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Cache Replication : packets go too far with timeToLive=0  XML
Forum Index -> Ehcache
Author Message
Titi34

neo

Joined: 07/07/2010 02:08:42
Messages: 2
Offline

Hi,

I am using a distributed cache with RMI
I have set up timeToLive=0 to block the replication to the same machine.

I have 2 Tomcat servers running on the same network but a different machine with this conf :

<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=0"
propertySeparator=","
/>

Sometimes, not all the time, data updated in one server are available in the other server, which means caches are replicated which shouldn't be because of timeToLive=0

Any idea ?
T
zeeiyer

consul

Joined: 05/24/2006 14:28:28
Messages: 493
Offline

Sorry its not too clear - what your issue is.
What I gather is that you have 2 Tomcats with Ehcache-RMI based replication turned on and you actually notice that caches are getting replicated... And you are wondering why since TTL=0?

TTL=0 means the cache element lives for eternity - so cache elements never expire and are therefore replicated. See http://ehcache.org/documentation/configuration.html



Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community
Titi34

neo

Joined: 07/07/2010 02:08:42
Messages: 2
Offline

I was talking about timeToLive in cacheManagerPeerProviderFactory config :

<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=0"/>


* timeToLive - specify a value between 0 and 255 which determines how far the packets will
propagate.

By convention, the restrictions are:
0 - the same host
1 - the same subnet
32 - the same site
64 - the same region
128 - the same continent
255 - unrestricted



I have 2 processes running on a machineA and 2 processes running on a MachineB. (same application with 2 environments test).

On the same machine, the 2 processes use a replicated cache. The problem is a modification done in the cache by one process is replicated to the 3 others process. It should be replicated only to the other process on the same machine because of timeToLive=0 (the same host)
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Issue seems to be resolved.Please let us know if more information is required.

Rakesh Joshi
Senior Consultant
Terracotta.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team