Using a load balancer to optimize internal communications

You can use an internal load balancer to optimize internal communications between the Gateway servers and Management servers. This is typically used when you want to gain finer control over load distribution, particularly if your IBM® API Connect cloud spans two or more different geographical locations.

About this task

By default, gateway servers in a given cloud communicate with all active Management servers in that cloud to receive configuration updates and post analytics data. To optimize server communications, you can choose to configure DNS and load balancing rules at each location to resolve a single internal load balancing address only to the Management servers that are in the same location. This configuration allows you to obtain the best load distribution for your enterprise.

A typical approach, for best performance, is to keep configuration and analytics communications from Gateway servers to Management servers within the same geographical location by preference, while still retaining the ability to fail over to a different location.

Procedure

To configure IBM API Connect to use an internal load balancer, complete the following steps:

  1. Decide on a single common host name to be used for the internal load balancer at each geographical location.
  2. At each location, configure DNS and load balancing rules to resolve the internal load balancer host name to the Management servers at that location. Configure the load balancing rules to forward requests on ports 2443 and 9443, and to not terminate SSL connections at the internal load balancer.
  3. Ensure that the firewall is configured to allow communication from the Gateway servers to the internal load balancer, and from the internal load balancer to the Management servers on the required ports; for more information, see Firewall requirements.
  4. Configure IBM API Connect to use the internal load balancer by completing the following steps:
    1. In the Cloud Manager, click Services.
    2. In the Management Services pane, click the Service Settings icon The Service Settings icon.
    3. Select Use a different hostname for internal communication.
    4. Enter the internal load balancer host name in the Hostname for internal communication field, and click Save Service.
      The internal load balancer settings are propagated to each of the Gateway servers in the API Connect cloud.
      Note: It can take several minutes for the propagation of the settings to complete.
  5. Verify your internal load balancer configuration by completing the following steps:
    1. In the Gateway Services pane, click the Server details icon
      for each Gateway server, and confirm that the managementLoadBalancingAddresses and analyticsLoadBalancingAddresses properties are set to the internal load balancer host name.
      If you observe either of the following conditions, it is likely that the internal load balancer is incorrectly configured, or is not reachable:
      • After a period of time, the managementLoadBalancingAddresses list indicates softdown status for the internal load balancer address.
      • The analyticsLoadBalancingAddresses list contains the earlier addresses of each of the management servers in the cloud instead of the new internal load balancer address.
    2. Create, deploy, and publish a new API to each of the gateway servers, and confirm that the following conditions are satisfied:
      1. You can successfully call the new API on each Gateway server.
      2. The new API calls are correctly reflected in the analytics information displayed in the API Manager UI.