API Gateway 10.3 | Using API Gateway | API Gateway Administration | General Configuration | Enabling Clustering for API Gateway
 
Enabling Clustering for API Gateway
API Gateway supports clustering to achieve horizontal scalability and reliability. Each API Gateway cluster node holds all the API Gateway components including UI, the API Gateway package and an Internal Data Store instance for storing assets. The synchronization of the nodes is performed through a Terracotta server array and Internal Data Store clustering that is defined across the Internal Data Store instances.
As each node of an API Gateway cluster offers the same functionality, nodes can be added or removed from an existing cluster. After you ensure that API Gateway has the appropriate environment, you can add it to the cluster by configuring the API Gateway to use clustering.
Keep the following points in mind when enabling clustering for API Gateway.
*Each API Gateway cluster node consists of an Internal Data Store instance for storing run-time assets and configuration items. For a cluster configuration, the Internal 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. For details on Internal Data Store configuration in a clustering environment, see webMethods API Gateway Configuration Guide.
*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 need to decide how many Terracotta Servers will make up the array and whether or not you will 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.
*You must have API Gateway administrator privileges to enable clustering.
*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
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 (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 screen.)
Action on startup
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.
Terracotta server array URLs
A comma separated list of the URLs for the Terracotta server array to be used with the cluster to which this API Gateway belongs.
The URLs must be in the format: host:port
5. Click Save.
Restart API Gateway. Log on as an Administrator and navigate to Administration > General > Clustering and verify that all nodes in the cluster are displayed under Cluster hosts.
Note:
Clustering must be enabled on all nodes in a cluster for them to be included in the cluster.