Configuring the embedded global cache

Configure the embedded global cache by setting properties in the server.conf.yaml configuration files.

Before you begin

About this task

To use the embedded global cache, set properties in the server.conf.yaml configuration files for the integration servers that share the embedded global cache. By default, the global cache is turned on.

You can configure the embedded global cache by directly setting the properties in the GlobalCache section of the server.conf.yaml files for your integration servers. Alternatively, you can copy and paste the content of the global cache section to replace the existing content of the GlobalCache section of your server.conf.yaml files, and then modify as required. The GlobalCache section is a subsection of the ResourceManagers section in the server.conf.yaml files.

Configuring within a single integration server

The embedded global cache is turned on by default, as it uses minimal CPU and memory until data is stored in it. It operates without requiring any replication configuration, similar to the local cache. Unless your server is configured to use WebSphere® eXtreme Scale (WXS) or a local cache by default, or you are creating maps with a new RedisConnection policy for an external Redis connection, any global maps you access will use the embedded global cache.

Configuring replication across integration servers

The replication system for the embedded cache consists of three configurable parts. The following example illustrates how three servers, with their relevant server.conf.yaml settings can share the embedded global cache. While secure replication is supported by the new embedded global cache, TLS configuration is omitted from this example for clarity.

Example of cache configuration with three servers:
Example of a cache configuration with three servers
Within each integration server, the message flows interact with the embedded global cache in that server.
  • replicateWritesTo: Integration Server 1 is configured to replicate cache writes from its own message flows to Integration Server 2. Any values that are put or updated by Server 1’s message flows in Server 1’s embedded cache will be asynchronously replicated to Server 2. If multiple servers are configured in replicateWritesTo, asynchronous write requests are sent to all the configured integration servers.
  • ReplicationListener: Integration Server 2 is configured to allow other servers to read from and write to its cache through the replication listener on port 7900.
  • replicateReadsFrom: Integration Server 3 is configured to replicate any missing reads from Server 2. If a value does not exist in Server 3’s embedded cache, it synchronously requests the value from Server 2 before continuing. If multiple servers are specified in replicateReadsFrom, each server is synchronously tried (in order) until a value is found, or all servers are tried.
You can configure these components within a single integration server to replicate its reads and writes to other servers and listen to other servers' requests to do the same.

Procedure

Configure the embedded global cache by completing the following steps:

  1. Open the configuration file for your integration server (server.conf.yaml) by using a YAML editor.

    You can edit the file by using the built-in YAML editor that is provided in the IBM App Connect Enterprise Toolkit, either by double-clicking the file in the Application Development view or by right-clicking the file and selecting Open with > YAML editor. If you choose to edit the file by using a plain text editor, ensure that you do not include any tab characters (which are not valid in YAML) and use a YAML validation tool to validate the contents of your file.

    For more information about configuring an integration server, see Configuring an integration server by modifying the server.conf.yaml file.

  2. Set the properties in the GlobalCache section of the server.conf.yaml file to configure the desired behavior of the embedded global cache.
  3. When you have modified and saved a server.conf.yaml file, restart the integration server for the changes to take effect.
    For information about how to start an integration server, see Starting an integration server.