Cache replication
Data is generated one time and copied or replicated to other servers in the cluster, saving execution time and resources. Caching in a cluster has additional concerns. In particular, the same data can be required and generated in multiple places. Also, the permission the resources need to generate the cached data can be restricted, preventing access to the data.
Cache replication addresses these concerns by generating the data one time and copying or replicating it to the other servers in the cluster. It also aids in cache consistency, in that cache entries that are not needed are removed or replaced.
The data replication configuration can exist as part of the Web container dynamic cache configuration accessible through the administrative console, or on a per cache entry basis through the cachespec.xml file. With the cachespec.xml file, you can configure cache replication at the Web container level, but disable it for a specific cache entry.
Cache replication can take on three forms:
- PUSH - Send out new entries, both ID and data, and updates to those entries.
- PULL - Requests data from other servers in the cluster when that data is not locally present. This mode of replication is not recommended.
- PUSH/PULL - Sends out IDs for new entries, then, only requests from other servers in the cluster entries for IDs previously broadcast. The dynamic cache always sends out cache entry invalidations.
The dynamic cache provides a batch update option. Specifically, for PUSH or PUSH/PULL, the dynamic cache broadcasts the update asynchronously, based on a timed interval rather than sending them immediately upon inception. Invalidators are sent immediately. Distribution of invalidations prevents stale data from residing in a cluster.
Configuring cache replication