Tutorial: Operating dynacache in a production environment >
< Previous | Next >

 

Set up cache replication in a clustered environment


This section gives instructions for setting up cache replication in a clustered environment.
In a production environment, it is common to have several application servers that form a cluster. In a clustered environment, set up cache replication for dynamic cache services to work properly. When setting up cache replication, it is not necessary to replicate all cache entries. You can control the cache replication policy on a cluster member level or on an individual cache entry level. Complete the following instructions to configure cache replication:

  1. Start the WAS administration server.

  2. Launch the WebSphere console.

  3. Create an Internal Replication Domain for the application.

    It is possible to create this as part of the initial cluster setup. If you have already created a Replication Domain for the application, use the existing one.

    1. Click Environment > Replication domains > New.

    2. Fill in the required fields. For Number of replicas, select Entire Domain. Save the changes.

  4. Enable cache replication in each clone.

    1. Click Servers > Application servers > Clone Name > Container Services > Dynamic Cache Service.

    2. To enable replication, select Enable Cache Replication.

    3. Choose a replication domain.

    4. Choose a replication type. For WebSphere Commerce, the recommendation is to use Not shared. Refer to Dynamic cache service settings for other options.

    5. Repeat steps a-d for each clone.

    6. Save your changes.

  5. Instead of using a default setting, always explicitly specify the replication mode for each entry in cachespec.xml. For example:

    • Add <sharing-policy>shared-push</sharing-policy> to each cache-entry in cachespec.xml.

    • Note: You can choose not to replicate certain cache entries. To configure a cache entry to not replicate, set < sharing-policy>not-shared</sharing-policy>. Refer to the cachespec.xml file. For more information on cache replication refer to Configuring cache replication in the WebSphere Application Server documentation.

  6. Restart all the servers.

  7. Use the Cache Monitor to verify that replication is working.


< Previous | Next >