OK, here's how it goes. You have two servers, a primary and an HDR secondary, call them node1 on host1 and node2 on host2 and you have a single Connection Manager, call it CM1 on host3. The servers each have a TCP and shared memory connection type defined, call them node1_tcp and node2_tcp and node1_shm and node2_shm respectively. Ideally you should have at least two and preferably three or four CMs, one on each host containing a server and one or two on a separate hosts.
Let's assume that you only have a single SLA defined in each CM. For now, with one CM, call the SLA cm1_sla. The CM config file will look something like this:
#
# Connection Manager configuration
#
NAME cm1
LOG 1
LOGFILE $INFORMIXDIR/tmp/cmsm_cm1.log
CLUSTER cluster_1
INFORMIXSERVER node_grp
SLA cluster_sla_1 DBSERVERS = PRI
FOC ORDER=ENABLED TIMEOUT=30 RETRY=10 PRIORITY=1
}
The sqlhosts files (which should be the same except for the shared memory connection name configurations on each host) should look like this:
cluster group - - i=2,c=1 # Connectin Manager failover group
cluster_sla_1 onsoctcp host3 sqlexec2
# cluster_sla_2 onsoctcp host4 sqlexec2 # Optional secondary CM on host4
# cluster_host1 onsoctcp host1 sqlexec2 # Optional local CM on host1
# cluster_host2 onsoctcp host2 sqlexec2 # Optional local CM on host2
####
# Failover group
####
node_grp group - - i=1,c=1,e=node2_tcp
node1_tcp onsoctcp host1 sqlexec g=node_grp
node2_tcp onsoctcp host2 sqlexec g=node_grp
Clients connect to <database>@cluster or have INFORMIXSERVER set to "cluster" and are connected to a random CM (if you configure more than one in the group "cluster". The Connection Manager that gets the connection matches the "servername" associated with it in the client's sqlhosts group, checks the cluster definitions it knows for that SLA and redirects the client to the current primary server in that cluster based on the SLA configuration.
You can certainly add the s=6 option and use dedicated server aliases for the connections between the primary and secondary servers, but the clients must connection on a "normal" entry that does not contain the s=6 designation.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------
Original Message:
Sent: Tue August 01, 2023 02:06 PM
From: Tereso Garcia
Subject: Informix HA Cluster and CM
I need to setup a HA cluster with replication. We are able to replica and test failover both ways on node1 and node2. HOw do I get a cluster server on these 2 nodes. so that the Connection Mgr is able to control failover and route connections to the new active node? Do I need to setup Linux OS cluster or Do I need to only setup the S=6 on the sqlhosts or C=1 at the option column on the sqlhosts ? So it only be informix configuration and no Linux OS setup at all ?
Do I require to setup a group among node1 and node2 like this topology picture for Primary / Secondary under group 1.
I am confused how the CM knows the secondary is now the active node as in a regular cluster where the heartbit promotes the secondary and node2 now owns the cluster listener on a linux cluster.
------------------------------
Tereso Garcia
------------------------------