Skip to main content
Planview Customer Success Center

How can I improve REST API traffic to a repository by using a load balancer?

Last Updated:    |  Applicable Hub Versions: All

Answer

REST API traffic from an integration can impact application server resource consumption such as memory and CPU. To improve application responsiveness and reduce errors during integration, Hub recommends servicing API traffic directly on a dedicated app server. This reduces load on other application servers in order to better handle traffic requested by users in the Hub UI. Additionally, this can prevent errors during integration related to an incorrectly configured load balancer.

Configuration

We recommend that:

  • All app server traffic generated by users in the Hub UI go through the load balancer to App Server 1, App Server 2, and so on (as shown in diagram below)
  • All API (e.g., integration-related) traffic go directly to an app server not known to the load balancer

47160930.png

Benefits

  1. Hub users will not be impacted by traffic generated by the API consumers
  2. If API traffic causes an outage, it will be isolated to the API app server and not impact Hub users

Impact of a Load Balancer

Using a load balancer for integration requires "sticky sessions" to be enabled to bind requests to the API app server during an entire session, ensuring that requests and activities are bound to the same app server. If this is not configured correctly, or if the load balancer attempts to change the node for the API traffic, the following problems can occur:

  1. Random Authentication errors as the API is jumping between app servers and authentication state is not shared
  2. Unexpected errors due to connections being closed when requests return large amounts of paged data
  3. Unpredictable performance of integration

ALM repository vendors have similar recommendations to best support any kind of API integration. Our recommendation to remove API traffic from the load balancer pool is to ensure that all integration requests go to the same app server. Some APIs may have inconsistent paths for integrations. For example, most Jira API requests are to /rest, while Jira attachments are accessed via /attachments. Our recommendation ensures that API requests with inconsistent paths will be properly routed.