Set cache replication


 

+

Search Tips   |   Advanced Search

 

Use the data replication service (DRS) to replicate data from the dynamic cache service across the consumers in a replication domain.

There are two ways to configure replication domains:

Do not use the default value of a single replica for the Number of replicas for dynamic cache replication domains. Use a full group replica.

If we configured cache replication with a previous version of WAS, review migrating servers from multi-broker replication domains to data replication domains.

To enable DRS to replicate cached data across the servers in a cluster...

  1. In the admin console, click...

    Servers | Application servers | myserver | Container services | Dynamic cache service

    ...and select...

    Enable cache replication
  2. Choose a replication domain.

    Use different replication domains for each type of consumer. For example, dynamic cache should use a different replication domain than session manager.

    The only replication domains that we can select in this panel include replication domains that are configured to use full group replication.

    In a full-group configuration, every cache entry is replicated to every other cache configured in the servers in the replication domain. If none of the replication domains in the configuration meet these requirements, the list is empty. In this case, create a replication domain or alter an existing replication domain so that we have a replication domain that can perform full-group replication.

  3. Define the dynamic cache replication settings.

    Click Enable cache replication. On this page, we can define when and how often data is replicated across the dynamic cache replication domain.

  4. Define sharing policies in cachespec.xml.

    You can override the global sharing policy by specifying a specific sharing policy in the cache policy. For example, if the global policy is to use Push only, set...

    <cache-entry>
    
      <sharing-policy>not-shared</sharing-policy>
      <class>servlet</class>
      <name>/app</name>
    
      <cache-id>
    
        <component id="action" type="parameter">
          <value>portfolio</value>
          <required>true</required>
        </component>
    
        <component id="JSESSIONID" type="cookie">
          <required>true</required>
        </component>
    
        <property name="EdgeCacheable">true</property>
    
      </cache-id>
    </cache-entry>
    

 

Next steps

Use the cache monitor to view the contents of the cache.

Invalidations of cache entries are sent across the cluster to keep the cached data consistent and valid.

 

Related tasks

Cache replication
Replicate data across appservers in a cluster
Use the dynamic cache service to improve performance

 

Related

Dynamic cache service settings