Software AG Products 10.11 | Administrating API Gateway | Deployment | Deployment Configurations | Cluster Deployment | API Gateway Cluster Configuration | Enabling Clustering for API Gateway through the User Interface
 
Enabling Clustering for API Gateway through the User Interface
Keep the following points in mind when enabling clustering for API Gateway.
*You must have API Gateway administrator privileges to enable clustering.
*For a cluster configuration, the embedded API Data Store instances should also be clustered using standard Elasticsearch clustering properties, by modifying the SAG_root/InternalDataStore/config/elasticsearch.yml file on each instance.
*If you are using Terracotta Server Array for clustering, ensure the following:
*To be in the same cluster, API Gateways must use the same Terracotta Server Array URLs and the same cluster name.
*An enterprise can have more than one cluster. To isolate multiple clusters on the same network, each cluster must have a different cluster name or different Terracotta Server Array or both.
*Before you enable clustering using Terracotta, perform the following steps to ensure that Terracotta Server Array is ready for use by the API Gateways in the cluster.
*Install the Terracotta Server Array if you have not done so already. For installation instructions, see Installing Software AG Products.
Note:
Before you install your Terracotta Server Array, you have to decide how many Terracotta Servers will make up the array and whether or not you want to mirror those servers. To guide your decision, review the sections on high availability and architecture in the product documentation for the Terracotta Server Array or consult your Software AG representative.
*Configure the tc-config.xml file on the Terracotta Server Array. For details on installing and changing a Terracotta license, see webMethods Integration Server Administrator’s Guide.
*To enable clustering
1. Expand the menu options icon , in the title bar, and select Administration.
2. Select General > Clustering.
3. Click the Enabled toggle button to state to enable the cluster.
4. Provide the following information:
Field
Description
Select cluster type
Specifies the cluster type.
You can select one of the following:
*None. Specifies a non-clustered set up.
*Ignite. Specifies you are using Apache Ignite for the clustering set up.
*Terracotta. Specifies you are using Terracotta Server Array for the clustering set up.
Cluster name
Specifies the name of the cluster to which API Gateway belongs.
Keep the following in mind when specifying the cluster name:
*The cluster name cannot include any periods ".". API Gateway converts any periods in the name to underscores when you save the cluster configuration.
*The cluster name cannot exceed 32 characters. If it does, API Gateway uses the first 20 characters of the supplied name and then a hash for the remaining characters.
Session time out (in minutes)
Specifies the number of minutes an inactive session is retained in the clustered session store.
The default is 60 minutes.
Set the clustered session timeout value to be longer than the session timeout value, which governs how long a server keeps session information in its memory. (API Gateway displays the session timeout on the Administration > System settings > Configuration page.)
Action on clustering failure
Specifies how API Gateway responds when an error at start up prevents API Gateway from joining the cluster. Select one of the following:
*Start as stand-alone API Gateway. API Gateway starts as a stand-alone, unclustered API Gateway if it encounters any errors that prevent it from joining the cluster at start up.API Gateway continues to receive requests on inbound ports and serve requests. This is the default setting.
*Shut down API Gateway. API Gateway shuts down if it encounters any errors that prevent it from joining the cluster at start up.
*Enter quiesce mode on stand-alone. API Gateway starts as a stand-alone, unclustered API Gateway in quiesce mode if it encounters any errors that prevent it from joining the cluster at start up. When API Gateway is in quiesce mode, only the diagnostic port and quiesce port are enabled.
Discovery port
This field is available and required when you select Ignite as the cluster type.
Specifies the port that is used to discover the members that participate in the cluster. Each cluster member opens this port in order to be discoverable. Each API Gateway server tries to contact other servers through this port.
When you specify the port number, make sure the port number ranges between 1024 to 65535.
Communication port
This field is available and required when you select Ignite as the cluster type.
Specifies the port that is used to communicate between distributed caches. Each server opens this port to be able to receive information. Each server distributes cache entries through this port to other cluster members.
When you specify the port number, make sure the port number ranges between 1024 to 65535.
Port range
This field is available and required when you select Ignite as the cluster type.
Specifies the number of ports to include in the range available to multiple cluster members on the same host. The default value is 0.
The Port range parameter applies to both the Discovery port and the Communication port.
Generally, each cluster member is deployed on its own host. However, for trial or demo purposes you might have multiple cluster members on the same host. In such a situation, each server requires its own discovery and communication port, and must know the other servers' ports. You can use the Port range parameter to configure this scenario. This parameter defines the size of a port range. For example, if you configure the port with port number 10100 and set Port range as 5, the resulting port range that is available is 10100 to 10105. When a server starts, it picks an unused port from the range 10100 to 10105, and uses the port to communicate with the other servers. Another server on start up can use an unused port from the same port range to communicate with the other servers. This allows all servers to use the same cluster configuration.
Provisioning target
This field is available and required when you select Ignite as the cluster type.
Specifies whether you want to use host name or Kubernetes service as the provisioning target.
Select one of the following as provisioning targets and provide the required details:
*Hostnames. Provide the name of the participating host in the cluster and click .
You can add multiple host names by clicking .
*Kubernetes. Provide the following details:
*Servicename. Provide the name of the service that exposes the API Gateway deployment.
*Namespace. Provide the name of the Kubernetes namespace within which the API Gateway is deployed.
Terracotta server array URLs
This field is available and required when you select Terracotta as the cluster type.
Provide the URL (host:port) of the TSA to use with the specific API Gateway's cluster and click .
You can add multiple TSA URLs by clicking .
5. Click Save.
6. Restart API Gateway.
7. Log on as administrator and navigate to Administration > General > Clustering and verify that all nodes in the cluster are displayed under Cluster hosts.
Note:
You must enable clustering on all nodes in a cluster for the nodes to be included in the cluster.