High Availability support
This topic describes how to configure high availability in an active-passive configuration using multiple servers. In this mode there is one Digital Lab server which is active, to which the load balancer routes all the requests, and another passive Digital Lab server, ready to take over in case of a failure in the active server. Monitoring that both servers are always up is recommended, to ensure that there is always a passive Digital Lab server ready.
This section is relevant only for UFT Digital Lab.
For configuring high availability for the PostgreSQL database, refer to the PostgreSQL documentation.
This section lists the prerequisites for implementing high availability.
- An external database installed on a separate machine should be used—not the Digital Lab embedded PostgreSQL.
- If you are currently using the UFTDigital Lab embedded PostgreSQL, migrate it an external PostgreSQL. For details, see Migrate the exported data to an external database.
- Increase the default maximum number PostgreSQL connections (by default 100) to 200 for Digital Lab. For details, refer to the PostgreSQL documentation.
File storage prerequisites
Make sure you have a location on the network in which to store the Digital Lab files.
If your Digital Lab file storage is currently on the Digital Lab server, move it to a separate machine. For details, see Migrate the file storage system.
Install Digital Lab
This section describes how to install Digital Lab on two servers for high availability.
- Install the first Digital Lab server. During the installation, use the load balancer FQDN in the server configuration, indicate that you want to use the external PostgreSQL, and provide the files storage path. During installation, clear the Embedded connector checkbox. This server is in active mode.
Install the second Digital Lab server. During the installation, use the load balancer FQDN in the server configuration, and select to use the same database and files storage path. By querying the database, the server detects that there is an active server, and goes into passive mode. During installation, clear the Embedded connector checkbox.
Tip: If you have already installed the server, modify the server configuration to use the load balancer FQDN. For details, see Reconfigure the Digital Lab server
We recommend monitoring that both the active and passive servers are always up. If a server fails, make sure to restart it, to ensure that there is always a passive UFTDigital Lab server ready. Note that devices should be connected using standalone connectors, and not directly to the high availability servers.
Configure the load balancer
To complete the implementation, you configure the load balancer.
To check which Digital Lab server is currently active, configure your load balancer to use the following REST API request:
GET https://<server address>:<server port>/rest/v2/status/active
- If the server is active, you receive the 200 OK response.
- If the server is passive, it returns the 503 - Service Unavailable response.
Sample HAProxy configuration
The following is an example of a common load balancer. It uses an HAProxy (high availability proxy) configuration for the
backend section in the haproxy.cfg file.
option httpchk GET /rest/v2/status/active HTTP/1.0
server server1 <address>:<port> check fall 1 rise 1
server server2 <address>:<port> check fall 1 rise 1