Overview

A cluster consists of a set of objects that act as a single instance, and divide the workload. Clustering improves performance as the requests are distributed across several objects. Clustering also improves reliability because if one object instance is unavailable or experiencing high traffic, other instances can handle the request.

The API Manager provides cluster support for application scaling and high availability. As an administrator, you can create a homogeneous cluster for scaling and availability for your APIs via the API Manager.

Starting a cluster

To start a cluster in the API manager:

  1. Change <cluster><enabled>false</enabled></cluster> to <cluster><enabled>true</enabled></cluster>.

To add a node to the cluster, start the node on a separate port. Any change in the API information in one node reflects in all nodes within a cluster.

If you add a new node to the cluster, perform the following SAML-related tasks:

  1. Copy the file seed.properties to the new node. You can locate the file in {API Manager_HOME}/conf/.
  2. Copy the file samlspcerts.jks to the new node. You can locate the file in {API Manager_HOME}/conf.
  3. Copy the following snippet in the config.xml file to the new node. You can locate the file in {API Manager_HOME}/config.
<keystore>
    <path>C:\ColdFusion2016APIManager\conf\samlspcerts.jks</path>
    <type>JKS</type>
    <password>eaf7e40627b249f7ab09d01b01efde77</password>
    <samlspalias>ampserviceprovider</samlspalias>
 <samlspkeypassword>8d4ba4d9cad64d31a29e6b05221e103a</samlspkeypassword>
</keystore>

Using the API Manager data store for clustering

When installing API Manager, you can opt to install the API Manager data store. All API Manager nodes that are a part of a cluster share a common data store. This server stores all configuration-related information of the API Manager. All nodes connected to the server share similar configuration.

Each server in the API Manager has its own cluster configuration. This configuration retrieves the connection details from the data store when a node starts up. In a clustered environment, the API Manager node connects to the server defined in the cluster configuration.

Accessing a node in Redis

By default when Redis is installed, it is reachable only through localhost (127.0.0.1). To access it from a remote machine, perform the following steps:

  1. Navigate to <API Manager installation directory>\database\datastore and open the file redis.windows.conf.properties. In case of Linux, it is redis.conf.properties.
  2. Specify the host name or IP address of the Redis data store in the bind section so that it can be accessible to remote API Manager nodes. You also perform this step when installing an API Manager node on a machine other than Redis datastore machine.

Viewing the cluster via the portal

You can view the cluster via the Administration portal if you install the API Manager stand-alone in your computer.

On the Admin portal, you can view the details of the data store to connect to.

Data store details
Data store details

On the Cluster Configuration page in the Administrator portal, you can view the list of nodes that are a part of a cluster. This information persists as part of the node configuration.

List of nodes in a cluster
List of nodes in a cluster

Accessing a node in Elastic Search

To access Elastic Search from a remote machine, perform the following steps:

  1. Navigate to <API Manager installation directory>\database\analytics\config and open the file elasticsearch.yml.
  2. Specify the host name or the IP address of the Elastic Search server in the network.host section so that the address is accessible to remote API Manager nodes.

Fault tolerance through clustering

Since clustering in the API Manager is homogenous, APIs published from one node are published from all nodes in the cluster. If any node fails, there is no impact on availability of the published APIs.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy