Network Deployment (Distributed operating systems), v8.0 > End-to-end paths > Dynamic caching > Improve service with the dynamic cache service > Task overview: Using the dynamic cache service to improve performance


Configure cache replication

Use this task to improve performance by configuring the data replication service (DRS) to replicate data from the dynamic cache service across the consumers in a replication domain.

Refer to the Cache replication article for more information about replicating data for the dynamic cache service.

You should have a replication domain created for the dynamic cache service. Configure a different replication domain for each type of consumer of the replication domain. For example, configure two different replication domains for dynamic cache and session manager. There are two ways to configure replication domains:

For more details about configuring replication domains, refer to the Replicating data across application servers in a cluster article.

Do not use the default value of a single replica for the Number of replicas for dynamic cache replication domains. Instead, use a full group replica for any replication domains that you configure for dynamic cache.

If you configured cache replication with a previous version of WAS, review the Migrating servers from multi-broker replication domains to data replication domains article to learn about the new type of replication domains that you should use with the current version of WAS.

Use this task to improve performance in a clustered environment by enabling the data replication service (DRS) to replicate cached data across the servers in a cluster. Invalidations of cache entries are sent across the cluster to keep the cached data consistent and valid.


Procedure

  1. In the administrative console, click...

        Servers > Server Types > WebSphere application servers > server_name

    > Container services > Dynamic cache service.

  2. To enable replication, select Enable cache replication.

  3. 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 you 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 that is configured in the servers that are 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. Refer to the Replicating data across application servers in a cluster article for more information.
  4. Define the dynamic cache replication settings. Click Enable cache replication. On this page, you can define when and how often data is replicated across the dynamic cache replication domain. For more information about these settings, refer to the Dynamic cache service settings article.
  5. Define sharing policies in the cachespec.xml file. We can override the global sharing policy by specifying a specific sharing policy in the cache policy. For example, if your global policy is to use Push only, you can change the sharing policy of a specific cache entry by making this change to your cache policy:
    <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> 
    For more information about the sharing policies that can be defined in the cachespec.xml file, refer to the cachespec.xml file article.


Results

Cache entries copy to the other application servers in the configured replication domain.


What to do next

Use the cache monitor to view the contents of the cache. Refer to the Displaying cache information article for more information.


Related


Cache replication
Replicating data across application servers in a cluster
Task overview: Using the dynamic cache service to improve performance
Migrate servers from multi-broker replication domains to data replication domains
Display cache information


Related


Dynamic cache service settings

+

Search Tips   |   Advanced Search