Split up gateway cluster into two separate clusters in Gateway 9.4

book

Article ID: 195631

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

our production cluster on Gateway version 9.4 currently consists of 14 hosts. Two of them hold the MySQL DB with a replication setup. We now want to split the cluster up into two clusters (8 nodes + 6 nodes). The current two DB hosts should remain in the 8 node cluster and 2 of the 6 nodes in the second cluster should then hold a newly created replicated DB with an initial full copy of all data of the current DB. We are currently staging to this cluster using ESM and so the second cluster must be integrated into ESM afterwards as a separate environment.

Do you have instructions/caveats regarding such a cluster split? We want to make sure that we can "duplicate" the cluster DB into the second cluster instance without any side effects and follow a recommended/supported path for this procedure. The alternative would be to set up an empty cluster and stage each service again but this process takes quite some time so the DB cloning would be most efficient to my mind.

The current setup:

- 2220 (Gateway) (DB1)
- 2221 (Gateway)
- 2222 (Gateway) (DB2)
- 2223 (Gateway)
- 2343 (Gateway)
- 2347 (Gateway)
- 2758 (Gateway)
- 2759 (Gateway)
- 2192 (Gateway)
- 2193 (Gateway)
- 2194 (Gateway)
- 2195 (Gateway)
- 2196 (Gateway)
- 2197 (Gateway)

Future setup:

Cluster 1:
- 2220 (Gateway) (DB1)
- 2221 (Gateway)
- 2222 (Gateway) (DB2)
- 2223 (Gateway)
- 2343 (Gateway)
- 2347 (Gateway)
- 2758 (Gateway)
- 2759 (Gateway)

Cluster 2:
- 2192 (Gateway) (DB3)
- 2193 (Gateway) (DB4)
- 2194 (Gateway)
- 2195 (Gateway)
- 2196 (Gateway)
- 2197 (Gateway)

Environment

Release : 9.4

Component : API GATEWAY

Resolution

These links describe splitting up the existing DB replication.
The following link outlines how to split an existing cluster into single nodes..
https://knowledge.broadcom.com/external/article?articleId=192087

Splitting a two node cluster into two independent nodes
https://knowledge.broadcom.com/external/article?articleId=10770

The following idea is a variant for splitting a cluster by "duplicating" the DB

Basically, it could consist of doing an export (e.g. using mysqldump or ssgbackup) on the DB1 host, followed by an import/restore from the data to the DB3 host,
maybe doing a "delete from cluster_info" if required, then setting up DB replication to DB4 host and then removing the affected nodes from Cluster1 (DB1/2) and then add them to Cluster2 (DB3/4).

Furthermore, mysqldump would be better for this scenario, cluster pass phrase across Vlan should remain intact and node.properties file shouldn't need changing.

you can use --all-databases which will include ssg, otk, oauth etc..
>> mysqldump --all-databases | gzip > /tmp/alldatabases_bkup.sql.gz

to restore:
>> tar -xvf /tmp/alldatabases_bkup.sql.gz
>> mysql -u root -p < alldatabases_bkup.sql

if you only want to backback ssg database:
>> mysqldump -u root -p ssg | gzip > /tmp/ssg_bkup.sql.gz

to restore:
>> tar -xvf /tmp/ssg_bkup.sql.gz
>> mysql -u root -p < ssg_bkup.sql