Qlik Sense Enterprise does not include load balancing support for the web (presentation tier). Network Load Balancer (NLB) device must be acquired and implemented if resilience is needed at this layer. This article details the basic requirements for the NLB to successfully work with Qlik Sense Enterprise.Environments:
- Qlik Sense February 2018 and earlier
For Qlik Sense April 2018 and later, see: Network Load Balancer (NLB) With Qlik Sense Enterprise April 2018 and later
Qlik Sense Hub (Hub) and Qlik Sense Management Console (QMC) are accessed through a web browser on client side towards a Qlik Sense Proxy (QPS). In a multi-node environment this means that each node is addressed with its unique address (URL). This potentially introduces a need to do DNS redirects or share new URLs to users, when nodes are taken down for maintenance or when new nodes are introduced.
A network load balancer (NLB) can be introduced in the Qlik Sense deployment to enable a single point of contact for the user client and to ensure High-Availability to end-users. The NLB also adds a single point of administration of where users should currently be routed.
The NLB can be can either be software or hardware-based, and must fulfill Qlik Sense load balancing requirements as listed below.Ports
All client side communication to Qlik Sense Enterprise is done towards the Qlik Sense Proxy Service (QPS). NLB must have the ports required by QPS open to all communications with the QPS instances that are included in the load balancing. Default ports are as described in "Ports used between user web browsers and proxies" section of Qlik Help - Ports Overview
. WebSocket protocol
Qlik Sense requires WebSocket communication for data transfer. Once HTTP/HTTPS communication has been initiated by the client, a WebSocket upgrade request is performed and maintained for the duration of the session. All networking solutions such as NLB, proxy, reverse proxies, and Enterprise Mobility Management (EMM) solutions between the client and Qlik Sense server must support and allow WebSocket traffic.Sticky/Persistent Session
Qlik Sense requires that an ongoing user session is routed and maintained consistently to the same QPS. Methods for doing this vary between NLB solutions – refer to the NLB documentation for information on the options available. Commonly this feature is referred to as "Sticky Sessions" or "Session Persistence".Session Grouping
For Windows authentication it is required to group the HTTP(S) and Windows authentication ports so that this remains persistent and stick to the same Qlik Sense node during authentication and following session.Session Timeout
The web session timeout (e.g. QPS or AccessPoint) should be configured longer in NLB than in Qlik Sense. Note, this is for the web session not for the Qlik Sense Engine.
Attached is high-level overview of network communications in a Qlik Sense environment between client and server. Includes WebSocket, HTTP/S, TLS, and load balancer touch points. The sheet is useful for initial exposure into the Qlik Sense client-server communication architecture.Troubleshooting
For validation and troubleshooting of NLB configuration, consider the following configuration order;
- Define Qlik Sense virtual proxy that allows anonymous access only
- Install Qlik Sense Websocket Connectivity Tester (https://github.com/flautrup/QlikSenseWebsocketConnectivityTester
- Configure NLB to only utilize one Qlik Sense node
- Configure NLB to access anonymous virtual proxy
- Validate connection and access by opening Qlik Sense Websocket Connectivity Tester through NLB
- Reconfigure NLB to access desired virtual proxy
- Validate authentication working by access Qlik Sense Hub through NLB
- Reconfigure NLB to include multiple Qlik Sense nodes in load balancing
- Validate load balancing by opening multiple concurrent user session