Skip to main content

Load Balancing and Failover Between Multiple InterSystems IRIS Server Instances

Load Balancing and Failover Between Multiple InterSystems IRIS Server Instances

In configurations with multiple (equivalent) InterSystems IRIS server instances, such as in a distributed cache cluster, the Web Gateway provides a basic (software-based) facility for implementing load balancing and failover between those InterSystems IRIS instances for web applications. An external solution like those described previously is the primary recommendation, however.

The failover mechanism provided by the Web Gateway is not necessary to implement failover between multiple InterSystems IRIS database servers in a typical High Availability configuration, such as failover clustering or InterSystems IRIS mirroring. Those technologies provide Virtual IP based failover and the Web Gateway can be configured to connect to that IP address.

The remainder of this section describes the load balancing and failover capabilities provided by the Web Gateway.

Web Gateway load balancing and failover is configured in the Application Access section of the Web Gateway management pages. See Configuring Application Access.

Navigate to System Administration > Configuration > Web Gateway Management and select Application Access. A list of InterSystems IRIS servers may be defined for an application (path). Use the options listed under the Use Alternative Servers For parameter to select the purpose for which they are to be used. The following options are available:

  • Fail-Over

  • Load-Balancing and Fail-Over

The default course of action is to use the first InterSystems IRIS server defined in the list. Following this default server is the list of alternative InterSystems IRIS servers, each designated as Server # where # is the server number.

The configuration screen initially shows only three empty server slots, but additional slots appear that enable you to define any number of alternative servers. Each server can be marked as Enabled or Disabled. The default setting is Enabled.

Load balancing is implemented in a round robin fashion. Each new user session is connected to the next available alternative server. Once a user session is established on a server, the Web Gateway maintains the session on that server unless it becomes unavailable, in which case the session is failed-over to the next available server in the list. State-aware sessions (preserve mode = 1) cannot be failed-over under any circumstances and, consequently, the session is closed if the hosting server becomes unavailable.

If a CSP server does not respond with the span of time specified by the Server Response Timeout parameter, the Web Gateway marks the server as offline and does not use it for load balancing. However, if Web Gateway Registry functions are enabled (they are enabled by default), then the Web Gateway periodically attempts to reconnect to CSP servers which are offline. If the connection to the CSP server succeeds, the Web Gateway marks it online and uses it for load balancing again, automatically.

FeedbackOpens in a new tab