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.
To facilitate development only, an Open Source version of Redis is supplied with the development product. for UNIX, ships with a version of Redis 6.2.6.
$COBDIR/AdoptRedis/redis-server
Redis high availability can be achieved by using Redis Sentinel.
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:
The default value is OFF.
The default value is 2000 (2 seconds).
The default value is 1.
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 --port 6741 --protected-mode no --bind 0.0.0.0
To start the Redis replica, on a command prompt, type:
redis-server redis_replica.conf
To start the 3 Redis sentinels, on a command prompt, type:
redis-server sentinel-1.conf –-sentinel redis-server sentinel-2.conf –-sentinel redis-server 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
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).