Skip to main content
Version: v2.18.x LTS

Using Infinispan as a storage solution through the Caching service

Using Infinispan as a storage solution through the Caching service

Required roles: system administrator, security administrator

You can configure Infinispan as a storage solution through the Caching service, as well as configure Infinispan for high availability to replicate data to provide data durability and availability.

Understanding Infinispan​

Infinispan is a storage solution that stores data structures in key-value pairs. The API Caching service uses hash sets, where each service storing data via the Caching service has its own hash, and each data entry is a key-value entry within that service's Infinispan hash set.

For more information on Infinispan, see the official Infinispan documentation.

Infinispan replica instances​

Infinispan can be used with both a standalone instance and high availability mode. When using multiple Caching Service instances, it is necessary to specify all of the cluster nodes (members). Each Infinispan node is bound to a specific Caching Service instance and runs on a different port and host, which can be configured. For more information about configuring multiple Infinispan modes, see the Infinispan configuration.

For more information on Infinispan replication and how to configure a replica instance, see the Infinispan Cross-site Replication documentation.

Infinispan configuration​

Configure Infinispan as a storage solution through the Caching service by setting the following configuration parameters in the zowe.yaml.

  • components.caching-service.storage.infinispan.initialHosts

    This property specifies the list of cluster nodes (members). Ensure that all the members listed are separated by a comma. The format is ${haInstance.hostname}[${components.caching-service.storage.infinispan.jgroups.port}].

    Example:

    components:
    caching-service:
    storage:
    infinispan:
    initialHosts: lpar1[7600],lpar2[7600],lpar3[7600]
  • components.caching-service.storage.infinispan.persistence.dataLocation

    The path where the service keeps its data files for the Infinispan Soft-Index Cache Store. The default value is data. When running the Caching Service in HA mode with instances on the same filesystem (for example, shared GPFS or NFS), each instance must use a unique path. This is because the Infinispan Soft-Index File Store requires exclusive access to its data and index directories, whereas sharing a path between instances will cause data corruption. For more information, see the Soft-Index File Store.

    note

    Beginning with version 2.18.4, this value is no longer used. If you migrate to this or a later version, leaving this configuration will result in a data migration. The new location is located at <workspace>/caching-service/<HA instance ID>/data. In case of non-HA instance value localhost is used as HA instance ID.

  • components.caching-service.storage.infinispan.persistence.indexLocation

    The path where the service keeps its index data for the Infinispan Soft-Index Cache Store. The default value is index. When running the Caching Service in HA mode with instances on the same filesystem (for example, shared GPFS or NFS), each instance must use a unique path. This is because the Infinispan Soft-Index File Store requires exclusive access to its data and index directories, whereas sharing a path between instances will cause data corruption. For more information, see the Soft-Index File Store.

    note

    The value is not used since version 2.18.4. If you migrate to this or a later version, leaving this configuration will result in a data migration. The new location is located at <workspace>/caching-service/<HA instance ID>/index. In case of non-HA instance value localhost is used as HA instance ID.

  • components.caching-service.storage.infinispan.jgroups.port

    (OPTIONAL)The default value is 7098. The port number used by Infinispan to synchronise data among caching-service instances.

  • components.caching-service.storage.infinispan.jgroups.host

    (OPTIONAL)The default value is taken from zowe hostname. The hostname used by Infinispan to synchronise data among caching-service instances.

  • components.caching-service.storage.infinispan.jgroups.keyExchange.port

    (OPTIONAL)The default value is 7118. The port number used by Infinispan to exchange encryption key among caching-service instances.

    Example of Caching service HA configuration using Infinispan:

    components:
    caching-service:
    storage:
    mode: infinispan
    infinispan:
    initialHosts: lpar1[7098],lpar2[7098]
    jgroups:
    port: 7098
    keyExchange:
    port: 7118

    haInstances:
    lpar1:
    components:
    caching-service:
    storage:
    infinispan:
    persistence:
    dataLocation: /global/zowe/workspace/caching-service/data01
    indexLocation: /global/zowe/workspace/caching-service/index01
    lpar2:
    components:
    caching-service:
    storage:
    infinispan:
    persistence:
    dataLocation: /global/zowe/workspace/caching-service/data02
    indexLocation: /global/zowe/workspace/caching-service/index02