Configure for High Availability
This section contains additional configuration tasks for setting up high availability on the Trifacta node.
The Designer Cloud Powered by Trifacta platform can also integrate with a highly available Hadoop cluster. For more information, see Enable Integration with Cluster High Availability.
Limitations
For more information on deploying high availability, see Install for High Availability.
Log File Setup
Since the platform nodes are mounting to the same directory, a configuration flag forces log files to be put into a subdirectory containing the hostname of the node from which the file was generated. The resulting directory structure:
/opt/trifacta/ --- conf --- bin --- logs/ --- node1/webapp.log --- node1/data-service.log --- node1/spark-job-service.log --- node1/... --- node2/webapp.log --- node2/data-service.log --- node2/spark-job-service.log --- node2/... ---- ......
Job logs are already prefixed with the job-group id, so there is no need to prefix them with the hostname.
The Download Logs should work independent of the node serving the endpoint, so there is no hostname prefixing required for the job logs.
To enable separation of log files into separate directories by node, please complete the following:
Steps:
Login as admin to the server (main) node in your HA environment.
To apply this configuration change, login as an administrator to the Trifacta node. Then, edit
trifacta-conf.json
. For more information, see Platform Configuration Methods.Set the following parameter to
true
:"feature.highAvailability.separateLogFilesByName": false,
Save the file.
Before restarting the server, please complete any remaining configuration changes.
Platform Configuration
Disable restart
The preferred method of restarting the platform is to use the Restart button in the Admin Settings page. When a Trifacta node is part of a high availability environment, the node cannot be restarted through the Admin Settings page, which only restarts the node. Other nodes in the environment are not restarted, and any configuration changes are not propagated.
Note
In an HA environment, each node must be started, stopped, and restarted through the command line. See Start and Stop the Platform.
To disable use of the Restart button in the Admin Settings page, please complete the following steps.
Steps:
Login as admin to the server (main) node in your HA environment.
To apply this configuration change, login as an administrator to the Trifacta node. Then, edit
trifacta-conf.json
. For more information, see Platform Configuration Methods.Set the following parameter to
false
:"feature.highAvailability.enableRestartFromAdminUI": true,
Save the file.
Before restarting the server, please complete any remaining configuration changes.
Disable job cancellation
In a high-availability environment, job cancellation is not supported. To disable, please complete the following steps.
Steps:
You can apply this change through the Admin Settings Page (recommended) or
trifacta-conf.json
. For more information, see Platform Configuration Methods.Verify that the following parameter is set to
false
:"feature.highAvailability.jobCancellation": false,
Before restarting the server, please complete any remaining configuration changes.
NFS Mount Setup
Each node shares the following resources:
Alteryx databases
Directories shared via NFS mount:
/opt/trifacta/logs /opt/trifacta/conf
Example NFS Mount
The following sections contain an example configuration for the NFS mount to be shared across all nodes.
Note
There are many ways to configure an NFS mount. The following example applies to CentOS 7. Please modify these commands for different operating systems and versions as needed.
Server-side Configuration
NFS service
Use the following command to install the required NFS packages on the server:
yum install nfs-utils nfs-utils-lib
Enable and start NFS services:
systemctl enable rpcbind systemctl enable nfs-server systemctl enable nfs-lock systemctl enable nfs-idmap systemctl start rpcbind systemctl start nfs-server systemctl start nfs-lock systemctl start nfs-idmap
Client-side Configuration
On each client node, install NFS packages:
yum install nfs-utils nfs-utils-lib
Enable and start the NFS services:
systemctl enable rpcbind systemctl enable nfs-server systemctl enable nfs-lock systemctl enable nfs-idmap systemctl start rpcbind systemctl start nfs-server systemctl start nfs-lock systemctl start nfs-idmap
Integrate with HAProxy Load Balancer
After you have installed the software on each node in your high availability environment and configured your NFS mount, please complete the following instructions to integrate each node with a load balancer.
Note
HAProxy is the recommended load balancer. These instructions apply to HAProxy. If you are using a different load balancer, please consult the documentation that came with your product.
Configuration example:
#--------------------------------------------------------------------- # Example configuration for a possible web application. See the # full configuration options online. # # http://haproxy.1wt.eu/download/1.4/doc/configuration.txt # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global # to have these messages end up in /var/log/haproxy.log you will # need to: # # 1) configure syslog to accept network log events. This is done # by adding the '-r' option to the SYSLOGD_OPTIONS in # /etc/sysconfig/syslog # # 2) configure local2 events to go to the /var/log/haproxy.log # file. A line like the following can be added to # /etc/sysconfig/syslog # # local2.* /var/log/haproxy.log # log 127.0.0.1 local1 notice chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user haproxy group haproxy daemon # turn on stats unix socket stats socket /var/lib/haproxy/stats #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults mode http log global option httplog option dontlognull option http-server-close option forwardfor except 127.0.0.0/8 option redispatch option log-health-checks retries 3 timeout http-request 10s timeout queue 1m timeout connect 10s timeout client 1m timeout server 1m timeout http-keep-alive 10s timeout check 1s maxconn 3000 #--------------------------------------------------------------------- # main frontend which proxys to the backends #--------------------------------------------------------------------- frontend main *:8088 # acl url_static path_beg -i /static /images /javascript /stylesheets # acl url_static path_end -i .jpg .gif .png .css .js mode http # use_backend static if url_static default_backend app #--------------------------------------------------------------------- # static backend for serving up images, stylesheets and such #--------------------------------------------------------------------- #backend static # balance roundrobin # server static 127.0.0.1:4331 check #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- backend app balance roundrobin option httpchk GET /v2/ping server app1 192.168.1.101:3005 check server app2 192.168.1.102:3005 check
Key Settings:
Setting | Description |
---|---|
balance | Set this value to the method of load balancing. Round robin is recommended. |
option httpchk | Please set the value to the following: GET /v2/ping |
server app1 | Set this value to the IP address of the server node. |
| Please insert separate entries for the IP addresses of each client node. |
Platform Start
To restart all nodes of the platform, please complete the following steps:
Note
When the platform is restarted in a high availability environment, all scheduled jobs that are in-progress or have been triggered during downtime may be assigned to a single node. To distribute across multiple nodes, restart all services except for the time-based service on each node. After all other services have restarted, start the time-based trigger service on each node.
Apply any configuration changes to
trifacta-conf.json
on the server. Since the configuration directory is now shared across all nodes, these changes are automatically applied to all client nodes.Verify that all nodes are pointing to the same instances of the Alteryx databases.
Start the master node.
Note
Nodes in an HA environment must be restarted at the command line. See Start and Stop the Platform.
Wait for it to complete restart.
Start each client node one at a time.
Note
Do not start multiple nodes at the same time, which can cause migration errors.
When all nodes are restarted, you may continue with any necessary configuration steps through the (main) server node.
Additional Configuration
Enable Redis Sentinel
You can configure the Trifacta node to connect to a high availability Redis deployment using Redis Sentinel. For more information, see Configure for Redis.