gateway-peering-cluster-create
This command creates the gateway peering cluster.
Syntax
gateway-peering-cluster-create replicas "primary-list" "secondary-list"
Parameters
- replicas
- Indicates the number of secondary nodes required for each primary node.
- primary-list
- Specifies the comma-separated list of primary nodes by address:port. This list must contain 3 primary nodes.
- secondary-list
- Specifies the comma-separated list of secondary nodes by address:port. This list must contain a minimum of 3 secondary nodes and must be a multiple of 3 based on the value of the replicas parameter.
Guidelines
The gateway-peering-cluster-create command creates the gateway peering cluster. A cluster must consist of at least 6 nodes where 3 must be primary nodes.
The replicas parameter determines the multiple of 3 for secondary nodes for
each primary node.
- With 1 replica, each primary requires 1 secondary node. Therefore, the cluster is 6 nodes with 3 primary and 3 secondary nodes.
- With 2 replicas, each primary requires 2 secondary nodes. Therefore, the cluster is 9 notes with 3 primary and 6 secondary nodes.
When you specify more than 1 replicas, the list of address:port pairs for the
secondary nodes is important. With 2 replicas, each primary has 2 secondary nodes. The assignment of
secondary nodes to primary node is as follows.
- The first and second secondary nodes in the secondary-list are assigned to the first primary in the primary-list.
- The third and forth secondary nodes in the secondary-list are assigned to the second primary in the primary-list.
- The fifth and sixth secondary nodes in the secondary-list are assigned to the third primary in the primary-list.
When you specify the address:port pair for primary and secondary nodes, the address can be either an IP address or a local host alias.
Do not use this command unless the gateway peering configuration sets
cluster-auto-config to off.
Example
Creates a cluster of 6 nodes across 2 data centers. The primary nodes are the ones with IP
addresses that start with 111.222. The secondary nodes are the ones that IP
addresses that start with 333.444. All nodes use port 18532.
gateway-peering-cluster-create 1 "111.222.125.2:18532,111.222.126.2:18532,111.222.127.2:18532" "333.444.125.2:18532,333.444.126.2:18532,333.444.127.2:18532"
When the mesh for the cluster is created successfully across the data centers, the show
gateway-peering-cluster-status command, independent of which system accessed, displays
data that is similar to the following data. The details are the actual IP address of the network
interface, whether the node is primary or secondary, its link status, its 40-digit node ID (shown
abbreviated), associated secondary IP when primary, and the slots
managed.
Address Primary Link status Node ID Secondary list Slots
------------------- ------- ----------- --------- ------------------- -----------
xxx.xxx.125.2:18532 yes ok 91a...687 yyy.yyy.125.2:18532 0-5460
xxx.xxx.126.2:18532 yes ok 43b...5f4 yyy.yyy.126.2:18532 5461-10921
xxx.xxx.127.2:18532 yes ok 18c...41f yyy.yyy.127.2:18532 10922-16383
yyy.yyy.125.2:18532 no ok 5c6...500 0-5460
yyy.yyy.126.2:18532 no ok 6e8...a87 5461-10921
yyy.yyy.137.2:18532 no ok 2e9...f76 10922-16383Although the output includes the following columnar data, the previous output does not list these details.
- The total number of keys that are stored across all databases.
- The ratio between net memory use and the key count.
If the output lists all nodes as primary, does not list 3 primary nodes, or does not list at
least 1 secondary for each primary, you might need to complete the following task on each DataPower® Gateway that is part of the mesh.
- Edit the associated gateway peering instance with the following command sequence. This sequence
assumes the
api-rategateway peering.# configure terminal (config)# gateway-peering api-rate (config gateway-peering api-rate)# admin-state disabled (config gateway-peering api-rate)# exit (config)# gateway-peering api-rate (config gateway-peering api-rate)# admin-state enabled (config gateway-peering api-rate)# exit - After editing all instances, run the gateway-peering-cluster-create command again.