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 global cache, set properties in the server.conf.yaml configuration files for the integration servers that will share the global cache. By default, the global cache is turned off.

You can configure the 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 sub-section of the ResourceManagers section in the server.conf.yaml files. The sample files show how to configure the global cache for different scenarios, from a basic configuration using a single integration server that is hosting both a catalog server and a container server, to more complex configurations involving multiple integration servers.

The following sample configuration files are provided with IBM App Connect Enterprise, in the install_directory\server\samples\globalcache directory. These files contain examples of various global cache configurations that you might require:
  • basic_1_catalog_1_container

    This scenario has one integration server, which hosts both a catalog server and a container server. It is recommended for development purposes.

  • basic_1_catalog_4_containers

    This scenario has four integration servers: one integration server hosts both a catalog server and a container server, and the other three integration servers host a container server each.

  • basic_2_catalogs_4_containers

    This scenario has four integration servers: two integration servers host both a catalog server and a container server, and the other two integration servers host a container server each.

  • ha_multi_instance

    This scenario has four integration servers: two integration servers host both a catalog server and a container server, and the other two integration servers host a container server each and must be used as part of a multi-instance integration node. In this scenario, a multi-instance integration node cannot be used to host an integration server with a catalog server.

Each of these sample files contains the global cache section of a server.conf.yaml configuration file. 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.

Depending on the type of data you store in your cache, you can configure your embedded global cache to use different locking strategies, and you can configure the use of replica shards for read access. For more information, see Optimizing the embedded global cache for use with different types of cache data.

If you stop the integration server that contains the catalog server, the cache becomes unavailable. If you restart the integration server that hosts the catalog server, it can no longer communicate with the container servers in other integration servers. Although these container servers are still running, they are no longer part of the cache, and your data is lost. Therefore, you must also restart the integration servers that host the container servers.

Procedure

Configure the global cache by completing the following steps:

  1. Open the configuration file for your integration server (server.conf.yaml) by using a YAML editor.
    If you do not have access to a YAML editor, you can edit the file by using a plain text editor; however, you must ensure that you do not include any tab characters, which are invalid characters in YAML and would cause your configuration to fail. If you are using a plain text editor, ensure that you use a YAML validation tool to validate the content 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 configuration files, either directly or by copying and pasting the content of sample global cache configuration files to replace the existing content of the GlobalCache section.
    The server.conf.yaml and sample configuration files contain information about the valid properties.

    For information about configuring the global cache by using the sample configuration files, see the following topics:

  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.