Skip to main content
Version: Deploy 24.3

Configure Caching for Deploy Cluster Setup

Note: Active-Hot-standby mode is not supported for caching setup.

You must perform these steps on all Deploy master servers in the cluster but not on the workers.

  1. Set the in-process-worker key to false (default value is true) in the deploy-task.yaml file.

  2. Set the cluster.mode key to full in the deploy-cluster.yaml file for_Active-Active_ cluster.

  3. Edit the deploy-caches.yaml file.

    1. Set the deploy.caches.enabled key to true (default value is false) in the deploy-caches.yaml file to enable application-level caching.
    2. Type the name of the properties file (infinispan-hotrod.properties) in the provider-configuration-file key.
    3. Type the name of the cache provider in the provider-configuration.provider key. For example, org.infinispan.jcache.remote.JCachingProvider.
  4. Optionally, you can configure the following individual caches in the deploy-caches.yaml file.

    CacheDescription
    CI_PK_CACHECache for CIs by primary keys
    CI_PATH_CACHECache for CIs by their paths
    CI_PROPERTIES_CACHECache for CI properties
    LICENSE_CI_COUNTCache for license restricted CI counts

    See deploy-caches.yaml file's configuration properties page for more information.

    Here is an example deploy-caches.yaml file used to enable distributed caching on Deploy cluster setups:

    deploy.caches for distributed/stand-alone cache

  5. Add the following circuit-breaker configuration to the infinispan-hotrod.properties file to handle situations when the Infinispan server is down:

infinispan.client.hotrod.connect_timeout=5000
infinispan.client.hotrod.max_retries=1
  1. Download and set up the Infinispan cache manager using one of the following options:

    • Download the Infinispan cache manager from here. Set up the Infinispan cache manager using the instructions on this page.
    • See this page if you want to start the Infinispan server using Docker.
  2. After starting the Infinispan server, ensure that the Infinispan console is accessible at http://localhost:11222.

  3. Using the sample pom.xml file, download the infinispan-jcache-remote 14.0.17 jar file with all its transitive dependencies, and copy the downloaded files to the /lib directory of all Deploy masters and workers.

    mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:copy-dependencies -f pom.xml -DoutputDirectory=$deployserver/lib  

    Note: $deployserver is the Deploy installation directory.

  4. Download the infinispan-hotrod.properties file and place it in the /conf directory of all Deploy masters and workers.

  5. Ensure that the infinispan-hotrod.properties file contains the correct credentials for Infinispan server console and that it is placed in the /conf directory of all masters and workers.

    Notes:

    • Make sure that the cache names mentioned in the infinispan-hotrod.properties file match with the default cache names (CI_PK_CACHE, CI_PATH_CACHE, and CI_PROPERTIES_CACHE).
    • Ensure that all CI caches (CI_PK_CACHE, CI_PATH_CACHE, and CI_PROPERTIES_CACHE) are enabled or disabled together.
    • Some properties such as ttl-minutes in the deploy-caches.yaml file exist under a different name (expiration lifespan) in the infinispan-hotrod.properties file. In such cases, the value provided in the infinispan-hotrod.properties file takes the higher precedence.
  6. Check the logs to ensure that the cache configuration is correct.
    Log showing Distributed Cache success Notes:

  • Any failure during the caching setup will be captured in the logs but will not stop the application from starting.
  • Verify that the cache manager is successfully created in the node before moving on to setup next master or worker node.

Troubleshooting

In case of any issues or unexpected behavior with the Deploy cache, check the logs for possible configuration issues such as the one shown below.

Cache Error

In such cases, correct the appropriate configuration parameter, restart the server and check the logs again.