Cache replication

 

+

Search Tips   |   Advanced Search

 

Cache replication generates data one time and copies to the other servers in the cluster. Cache entries that are not needed are removed or replaced.

The data replication configuration can exist as...

Cache replication can take on three forms:

PUSH Cache entries are pushed to cluster members. These entries cannot store non-serializable data.
PULL Pulls data from other members of the cluster. Not recommended.
PUSH/PULL Cache entries are shared between appservers on demand.

When an appserver generates a cache entry, it broadcasts the cache ID of the created entry to all cooperating appservers. Each server then knows whether an entry exists for any given cache ID. On a given request for that entry, the appserver knows whether to generate the entry or pull it from somewhere else. These entries cannot store non-serializable data.

The methods...

  • DistributedMap.containsKey()
  • DistributedMap.keySet()

...do not show the key that has been broadcasted in the receiving server. This is because the keys that are stored in table...

DRSPushPullTable

...are different from the backing map that is used by local cache...

DistributedMap

The method...

DistributedMap.get(Object key)

...will retrieve the value from the server that broadcasted the key.

The dynamic cache service broadcasts cache replication updates asynchronously, based on the batch update interval set via the console, rather than sending them immediately, when they are created. Invalidations are sent immediately.

In PUSH/PULL mode, the cached object is kept locally on the server that creates it; however, other servers also use the cache ID and store it in the DRSPushPullTable table. If a remote server needs the object, it requests the object by cache ID, or name, from the creating server.

Each cache instance has one DRSPushPullTable table that is associated with it.

The following conditions cause the DRSPushPullTable table to grow too big:

Use the following suggestions to resolve the issue:

See also...