Deploying a load balancer

In a deployment with HADR, there are multiple Liberty servers that host the i2 Analyze application. To enable analysts to connect to the deployment by using a single URI, you must use a load balancer to route requests to each Liberty server in your deployment.

About this task

For a load balancer to work successfully with i2 Analyze, it must be configured to:
  • Handle WebSocket requests.
  • Route requests to the i2 Analyze application on active Liberty servers only.
  • Use a cookie issued by the load balancer to achieve server persistence for a user. The server persistence should last as long as possible or until the server is not active.
If the connection from the clients is secured by using SSL, you might need to implement SSL termination in the load balancer to achieve server persistence.

You can also configure your load balancer to balance requests across the Liberty servers in your deployment. The mechanism that you choose must allow for server persistence to be maintained.

For more information about load balancers and application layer server persistence, see Load Balancing, Affinity, Persistence, Sticky Sessions: What You Need to Know.

Procedure

  1. Install your load balancer on a separate server from any other component in the deployment.
  2. Configure your load balancer to identify the active Liberty servers by using the api/v1/health/live REST endpoint.
    The live endpoint returns 200 when the server is live and processing requests. For more information about the endpoint, see The health/live endpoint.

    Call the live endpoint on each Liberty server in your deployment. The endpoint returns the status of a single Liberty server, and not the others in the deployment.

  3. Configure your load balancer to use cookie-based server persistence.
    When a user connects, if there is no cookie from the load balancer that indicates it has already connected to one of the active Liberty servers, provide it with one. When this user connects again, the cookie it received ensures that any requests are routed to the same Liberty server.

    If the server that a user has persistence with is offline, the load balancer must route the request to a live Liberty server. The user's cookie must be updated to achieve persistence with the live server that it connected to.

  4. Before you can connect to i2 Analyze via the load balancer, you might need to specify the connection URI that clients can use to connect to i2 Analyze.
    1. In the configuration\fragments\opal-services\WEB-INF\classes\DiscoClientSettings.properties file, set the value of the FrontEndURI setting to the URI that can be used to connect to your deployment of i2 Analyze.
    For more information, see Specifying the connection URI.
    Some load balancers modify the HTTP origin header, the value that you specify for the FrontEndURI must match the value of the HTTP origin header after it is modified by the load balancer.

What to do next

Continue configuring the i2 Analyze configuration. For more information, see Deploying i2 Analyze with high availability.