Configure WXS Dynacache with Commerce

 

+

Search Tips   |   Advanced Search


  1. On all catalog server hosts, start catalog service...

    cd $WXS_HOME/ObjectGrid/bin
    ./startOgServer.sh catalog1

  2. On container server hosts, go to...

    $WXS_HOME/ObjectGrid/dynacache/etc

  3. Review settings in...

  4. Start container servers...
    cd $WXS_HOME/ObjectGrid/bin 
    
    ./startOgServer.sh container1  \
          -objectGridFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-objectgrid.xml  \
          -deploymentPolicyFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-deployment.xml  \
          -catalogServiceEndPoints MyCatalogServer:2809 
    
    ./startOgServer.sh container2  \
          -objectGridFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-objectgrid.xml  \
          -deploymentPolicyFile $WXS_HOME/ObjectGrid/dynacache/etc/dynacache-remote-deployment.xml  \
          -catalogServiceEndPoints MyCatalogServer:2809 
    

  5. Log on to the console and go to...

    Servers | WebSphere application servers | server1 | Container Services | Container Settings | Dynamic cache service

  6. Set Cache provider to WebSphere eXtreme Scale

    Verify Enable cache replication is set to true.

  7. Go to...

    WASs | server1 | Java and Process Management | Server Infrastructure | Process definition | Java Virtual Machine | Additional Properties | Custom properties

    ...and verify settings...

    com.ibm.commerce.dynacache.decrypt false
    com.ibm.security.jgss.debug off
    com.ibm.security.krb5.Krb5Debug off
    com.ibm.servlet.file.esi.timeOut 0
    com.ibm.websphere.ejbcontainer.FbpkAlwaysReadOnly true
    com.ibm.websphere.xs.dynacache.disable_recursive_invalidate true

    Set to true to prevent recursive invalidations of dependency IDs.

    com.ibm.websphere.xs.dynacache.enable_compression true

    Set to true to reduce the size of the data in the cache and reduce network traffic.

    com.ibm.websphere.xs.dynacache.ignore_value_in_change_event true

    Set to true to indicate that the cache value should not be de-serialized for a change event.

    com.ibm.websphere.xs.dynacache.topology remote

    This is the most important property we need to set. We are using remote to signify that the cache data is stored outside of the WebSphere Commerce JVMs. Other potential values are local, embedded, and embedded_partitioned.

    com.ibm.ws.cache.CacheConfig.alwaysTriggerCommandInvalidations true
    com.ibm.ws.cache.CacheConfig.cascadeCachespecProperties true
    com.ibm.ws.cache.CacheConfig.disableStoreCookies ALL
    com.ibm.ws.cache.CacheConfig.disableTemplateInvalidation true
    com.ibm.ws.cache.CacheConfig.filterLRUInvalidation true
    com.ibm.ws.cache.CacheConfig.filterTimeOutInvalidation true
    com.ibm.ws.cache.CacheConfig.htodDelayOffloadEntriesLimit 100000
    com.ibm.ws.use602RequiredAttrCompatibility true
    com.ibm.ws.webservices.searchForAppServer true

  8. Go to...

    System administration | WebSphere eXtreme Scale | Catalog service domains | New

  9. Enter Name for new catalog service domain, and set this domain as the default...

    Because our catalog server is running outside of the WebSphere Application server we...

    • Selected Remote Server
    • Entered the Remote Server hostname for the catalog service
    • Entered the Listener Port of 2809 (the default)

  10. Click OK and Save to create the new domain.

  11. Test the connection

  12. Cycle appserver

  13. Log file...

    $WC_PROFILE/logs/server1/SystemOut.log

    ...should contain...

    CacheServiceI I DYNA1054I: Dynamic Cache (core cache) initialized successfully.
    ObjectCacheSe I DYNA1056I: Dynamic Cache (object cache) initialized successfully.
    CacheProvider I CWOBJ4500I: WebSphere eXtreme Scale Dynamic Cache provider is successfully initialized.
    ObjectGridImp I CWOBJ4700I: The map name IBM_DC_PARTITIONED_baseCache matched the regular expression of template map IBM_DC_PARTITIONED_.*. The IBM_DC_PARTITIONED_baseCache map has been created for ObjectGrid DYNACACHE_REMOTE.
    CacheProvider I CWOBJ4508I: The WebSphere eXtreme Scale provider has created a Dynamic Cache instance with name baseCache using topology remote.

  14. Validate map sizes by running...

    cd $WXS_HOME/ObjectGrid/bin
    ./xsadmin.sh -mapsizes

    ...which should generate something like...

    Connecting to Catalog service at localhost:1099

    ** Displaying Results for...

    Grid - DYNACACHE_REMOTE
    MapSet - DYNACACHE_REMOTE

    ** Listing Maps for container1

    Map Name Partition Map Size Used Bytes (KB) Shard Type
    IBM_DC_PARTITIONED_baseCache 0 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 1 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 2 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 3 3 2 AsynchronousReplica
    ...
    IBM_DC_PARTITIONED_baseCache 41 3 3 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 42 2 656 Primary

    Server Total: 105 (57KB)

    *** Listing Maps for container2 ***

    Map Name Partition Map Size Used Bytes (KB) Shard Type
    IBM_DC_PARTITIONED_baseCache 0 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 1 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 2 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 3 3 2 Primary
    IBM_DC_PARTITIONED_baseCache 4 2 656 Primary
    IBM_DC_PARTITIONED_baseCache 5 3 2 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 6 2 656 AsynchronousReplica
    ...
    IBM_DC_PARTITIONED_baseCache 41 3 3 Primary
    IBM_DC_PARTITIONED_baseCache 42 2 656 AsynchronousReplica
    IBM_DC_PARTITIONED_baseCache 43 2 656 AsynchronousReplica

    Server Total: 105 (57KB)
    Total Domain Count: 210 (114KB)

    Note that...

    1. The name of the grid and MapSet are both DYNACACHE_REMOTE. These are the default grid and MapSet names used by the WebSphere eXtreme Scale dynamic cache provider.

    2. The map name is IBM_DC_PARTITIONED_baseCache. This is the default map that is used for the base cache dynamic cache implementation.

    3. Both container servers are listed with an appropriate distribution of primary and asynchronous replicas.

    4. Partitions with map sizes greater than 2 contain dynamic cache specific content. Every partition will automatically include 2 entries used for management purposes as part of the dynamic cache implementation. Any additional entries represent application content in the dynamic cache.

    5. In WXS v7.1 (used in the sample) there is a bug in the xsadmin utility when displaying used bytes. Ideally entries should be presented in either bytes or kilobytes (KB) consistently. However, until all entries grow to a size greater than 1KB there is a mixture of byte and KB entries in the table. In the output above the entries with a bytes used count of 656 represent 656 bytes while those with bytes used count of 2 or 3 represent kilobytes used. As noted in the banner of the output this is an unsupported utility but we hope to have an ifix available soon to correct this issue.

    6. The total server size is presented for each container server. This size is correctly calculated and displayed in KB.

  15. You can also access the WXS web console...

    https://hostname:7443/

    Default username/password is admin/admin

  16. Use cache monitor verify the Commerce application is being cached

 

See also

  1. WebSphere Commerce with WXS DynaCache