Redis Requirements and Configuration as a Scale-Out Repository

In general, you can store CICS tables in REDIS as well as TSQ and TDQ data. These will contain application data. For more information on Redis and the data types it can store, refer to its documentation here.

For a production environment, Micro Focus recommends using an enterprise-ready Redis server that supports Redis 5.0.3 to 6.2.6. However, you will require version 6.0 and later to support TLS connections. [5]

To facilitate development only, an Open Source version of Redis is supplied with the development product. for Windows and UNIX, ships with a version of Redis 6.2.6. [5]

Note: The Windows version of Redis that is shipped with Enterprise Developer is for testing purpose only and is not intended for use in a production environment. For a production environment, Micro Focus recommends using an Enterprise-ready Redis compatible NoSQL database run on Linux or Windows, as required. The open-source Redis provided with the product can only be used in a UNIX environment.
To start the Redis server for UNIX environments, start a command prompt, and then type:
$COBDIR/AdoptRedis/redis-server
Note: This starts the Redis server on the default port 6379.

Redis high availability can be achieved by using Redis Sentinel.

Redis Communication Configuration Requirements

You can configure communication with Redis by setting the environment variable MFREDIS_CONFIG to point to a configuration file. This configuration file can contain the following variables:

RD_KEEPALIVE_INTERVAL
Specifies the keepalive interval in seconds used for Redis connections. The default value is 15.
RD_LUA_LOG
This variable enables logging on the Redis server.
Note: The Redis server must be started with --log-level set to warning as a minimum.
ON
Enables logging.
OFF
Disables logging.

The default value is OFF.

RD_RETRY_INTERVAL
Specifies how long, in milliseconds, the Redis client should wait before reattempting to connect and perform the last failed request.

The default value is 2000 (2 seconds).

RD_RETRY_ATTEMPTS
Specify the number of attempts the Redis client should try to perform the last failed request.

The default value is 1.

Additional Configuration for Redis Sentinel

The following additional configuration is required for Redis Sentinel.

In Redis, you need to specify a Redis master and as many Redis replicas as you require. An odd number of Redis Sentinel is required to make a quorum.

The following is an example of how to start and configure a Redis Sentinel that has a master on port 6741, 1 replica on port 6742 and 3 sentinels on ports 6800, 6801, and 6802.

To start the Redis master, on a command prompt, type:

redis-server.exe --port 6741 --protected-mode no --bind 0.0.0.0

To start the Redis replica, on a command prompt, type:

redis-server.exe redis_replica.conf

To start the 3 Redis sentinels, on a command prompt, type:

redis-server.exe sentinel-1.conf –-sentinel
redis-server.exe sentinel-2.conf –-sentinel
redis-server.exe sentinel-3.conf –-sentinel

In this case, your Redis master will be called MY_MASTER, this needs to be in uppercase. The following is an example of the content for the redis_replica.conf file. In the following configuration files, ensure that the text in bold is modified to reflect your requirements:

bind 0.0.0.0
port 6742   ## The port used by the replica.
tcp-backlog 511 
timeout 0 
tcp-keepalive 0 
loglevel notice 
logfile "" 
databases 16 
save 900 1 
save 300 10 
save 60 10000 
stop-writes-on-bgsave-error yes 
rdbcompression yes 
rdbchecksum yes 
dbfilename "dump.rdb" 
replicaof 127.0.0.1 6741    ## The port and IP used by the master
replica-serve-stale-data yes 
replica-read-only yes 
repl-diskless-sync no 
repl-diskless-sync-delay 5 
repl-disable-tcp-nodelay no 
replica-priority 100 
appendonly no 
appendfilename "appendonly.aof" 
appendfsync everysec 
no-appendfsync-on-rewrite no 
auto-aof-rewrite-percentage 100 
auto-aof-rewrite-min-size 64mb 
aof-load-truncated yes 
lua-time-limit 5000 
slowlog-log-slower-than 10000 
slowlog-max-len 128 
latency-monitor-threshold 0 
notify-keyspace-events "" 
hash-max-ziplist-entries 512 
hash-max-ziplist-value 64 
set-max-intset-entries 512 
zset-max-ziplist-entries 128 
zset-max-ziplist-value 64 
hll-sparse-max-bytes 3000 
activerehashing yes 
client-output-buffer-limit normal 0 0 0 
client-output-buffer-limit replica 256mb 64mb 60 
client-output-buffer-limit pubsub 32mb 8mb 60 
hz 10 
aof-rewrite-incremental-fsync yes

The content of the sentinel-1.conf, sentinel-2.conf, and sentinel-3.conf are the same except for the port. Modify the port to correspond to the port used by the appropriate sentinel:

port 6800     ## The port used by the sentinel
sentinel monitor MY_MASTER 127.0.0.1 6741  ## The name, IP, and port used by the master.
sentinel down-after-milliseconds MY_MASTER 5000
sentinel failover-timeout MY_MASTER 60000 
sentinel parallel-syncs MY_MASTER 1

For the PAC configuration, in ESCWA, the SOR name must match the Redis master name MY_MASTER followed by all the sentinel IP and ports, for example:

set ES_SCALE_OUT_REPOS_1=MY_MASTER=redis,127.0.0.1:6800,127.0.0.1:6801,127.0.0.1:6802##TMP

Configuring a TLS Enabled Redis Connection

You can configure a TLS enabled Redis connection by specifying redis_TLS for the sorType parameter of the ES_SCALE_OUT_REPOS environment variable. For example:
ES_SCALE_OUT_REPOS_1=MySOR=redis_TLS,127.0.0.1:6379##TMP#
In addition to this you must also specify the ES_RTLS_CERT_AUTH_FILEPATH , ES_RTLS_CERT_FILEPATH, and ES_RTLS_PRIVATE_KEY_FILEPATH environment variables for each enterprise server region that is a member of the PAC. Alternatively, in ESCWA, you can specify the Certificate Authority Filepath, Certificate Filepath, and Private Key Filepath properties on the Advanced Region Properties page for all enterprise server region that are members of a PAC which has a TLS enabled Redis Scale-Out Repository (SOR).