High Availability
18. Set Data Engine to 1 and select the Repository check box
19. Click OK.
The Servers tab should now look similar to the following:
20. You can also set up email alerts so that you’re notified of server failures or changes in status for your data engine and repository processes. To do this, click the Alerts and Subscriptions tab in the Configuration dialog box and follow the steps inConfigure Email Alerts on page 12.
21. Click OK to close the Configuration dialog box.
22. Start the serveron the primary (it may take a few minutes for your changes to take effect). Your system is now configured to provide failover support for the data engine and repository processes. It is also configured for multiple gateways. You can nowuse a load balancerto ensure the cluster's availability in the event of a gateway failure—and to distribute the cluster's workload.
The Status table on the Maintenance page should look similar to the following:
A light green check mark means a process is standing by, ready to take over if the active process (dark green check mark) should fail.
Confirm Failover Externally
Once you add a second server that is running the data engine or repository, you can use the Use external hosts to confirm failover check box on the Servers tab. This option lets you list one or more computers or websites external to your Tableau Server cluster that will be used to check the cluster's connectivity status in the event of a failover.
Using an external host or website to confirm failover is most useful in a two-node Tableau Server system like the following:
In the above system, the primary Tableau Server and a worker server are running the active and standby instances of the data engine and the repository, as well as gateways. The third computer, external to the Tableau Server cluster is being used as a third point of contact for the two gateways. Here's why: When a Tableau server that's running the data engine or the repository loses connectivity with the other nodes, it checks with a gateway process external to itself (but still within the Tableau Server cluster) to determine which node failed and whether any standby processes now need to become active. In a two-node cluster, if connectivity is lost, it's not possible to reach that other Tableau gateway process. In these cases, a computer that isn't running Tableau can be used to make a simple TCP connection. If the worker server in the above diagram lost connectivity with the primary but could still connect to the external host, that would be the trigger for it to start running the active instances of the data engine and repository.
If the external host or website can't be reached, neither the active nor standby repository will start, and a message is written in one of two log files on the servers that are hosting the data engines:
l tabspawnpg.log—If the external server is accessible when Tableau Server starts, but is not available when the repository starts (or restarts), the error is logged in
ProgramData\Tableau\Tableau Server\data\tabsvc\logs\pgsql\tabspawnpg.log or
l tabadmin.log—If the external server is unreachable when Tableau Server starts,
Tableau Server will not start successfully and the error is logged in ProgramData\Tableau\Tableau Server\Logs\tabadmin.log.
Example log messages:
2013-11-04 14:42:23.934 -0800 ERROR root: Not "Primary": No quorum. Cannot reach external failover confirmation host on myco.example.lan:80 from 10.98.7.65
2013-11-04 14:42:23.945 -0800 ERROR root: Not "Secondary": No quorum. Cannot reach external failover confirmation host on myco.example.lan:80 from 10.98.7.65
Add a Load Balancer
You can enhance the reliability of a Tableau Server cluster by running multiple gateways and configuring a load balancer to distribute requests across the gateways. Unlike the repository process, which can be active or standby, all gateway processes are active. If one gateway in a cluster becomes unavailable, the load balancer stops sending requests to it. The load balancer algorithm you choose determines how the gateways will route client requests.
If you plan to also create a backup primary and that computer will be running a gateway process, be sure to identify that gateway to your load balancer, along with all the other gateways.
Guidelines
Note the following as you configure your load balancer to work with Tableau Server:
l Tested load balancers: Tableau Server clusters with multiple gateways have been tested with Apache and F5 load balancers.
If you are using an Apache load balancer and creating custom administrative views, you need to connect directly to the Tableau Server repository. You cannot connect through the load balancer.
l Tableau Server URL: When a load balancer is in front of a Tableau Server cluster, the URL that's accessed by Tableau Server users belongs to the load balancer, not the primary Tableau Server.
l X-Forwarded-For and X-Forwarded-Host headers: The Tableau ServerUser Activityadministrative view displays client IP addresses, among other information. For this view to display the IP addresses of clients instead of the cluster's load balancer, the X-Forwarded-For and X-Forwarded-Host headers may need to be explicitly enabled on the load balancer (some load balancers have it enabled by default, some do not).
l Trusted host settings: The computer running the load balancer must be identified to Tableau Server as a trusted host. See the procedure below for how to configure Tableau Server.
l Proxy server configurations: The settings used to identify a load balancer to Tableau
Server are the same ones that are used to identify a proxy server. If your Tableau Server cluster requires both a proxy server and a load balancer, both must be handled by the same process, on the same machine.
Configure Tableau Server to Work with a Load Balancer
You can configure Tableau Server to work with a load balancer by performing the following steps.
1. Stop the server.
2. In the Tableau Server bin directory, enter the following command, where name is the URL that will be used to reach Tableau Server through the load balancer:
tabadmin set gateway.public.host "name"
For example, if Tableau Server is reached by entering tableau.example.com in a browser address bar, enter this command:
tabadmin set gateway.public.host "tableau.example.com"
3. By default, Tableau assumes that the load balancer is listening on port 80 for external communications. To use a different port, enter the following command, where port_
numberis the port:
tabadmin set gateway.public.port "port_number"
4. Now, enter the following command, where server is the IPv4 address or computer name of the load balancer:
tabadmin set gateway.trusted "server"
The value for server can be a comma-separated list, for example:
tabadmin set gateway.trusted "123.45.67.890, 123.45.67.880, 123.45.67.870"
or
tabadmin set gateway.trusted "proxy1, proxy2, proxy3"
5. In the next command, you will provide any alternate names for the load balancer, such as its fully-qualified domain name, any non-fully-qualified domain names, and any aliases. These are the names a user might type in a browser. Separate each name with a comma:
tabadmin set gateway.trusted_hosts "name1, name2, name3"
For example:
tabadmin set gateway.trusted_hosts "lb.example.com, lb, ftp.example.com, www.example.com"
6. Run the config command:
tabadmin config
7. Start the serverso the changes can take effect.
Configure a Backup Primary
Before you follow the procedures in this topic, follow the steps inConfigure for Failover and Multiple Gateways on page 50. After going through those steps, you have two worker servers that are providing failover support. Each server is also running a gateway, for which a load balancer can be configured. The primary Tableau Server is running a gateway process and licensing, which is not exposed or assignable as a process. Now that you have redundancy for the data engine, repository, and gateway, you need to build in redundancy for your primary Tableau Server. You do this by creating a backup of it. While the backup primary needs to be licensed during installation, it does not count as one of the three environments allowable under the Tableau EULA.
Keep in mind that licensing is checked every 8 hours. If the primary is only running the licensing component, and depending on when the licensing check last occurred, you have up to 8 hours to bring the backup primary online. During that window of time, the cluster will continue to function. For example, if the licensing check occurred 7 hours and 50 minutes ago, you have 10 minutes. If the licensing check occurred 1 minute ago, you have 7 hours and 59 minutes. To see when the last licensing check occurred, look at the checklicense_lic.log file and other log files in the ProgramData\Tableau\Tableau Server\data\tabsvc\logs\licensing folder.
The first procedure below describes how to create a backup of your primary. The second procedure walks you through what to do if your current primary fails.
Creating a Backup Primary
Do the following to create a backup primary:
1. Stop the serveron your primary Tableau Server.
2. On the primary, open a command prompt as an administrator and navigate to the Tableau Server bin directory:
C:\Program Files\Tableau\Tableau Server\8.2\bin
3. Version 8.1.3 and earlier: Enter the following command, where <primary1> is the current primary's IPv4 address or computer name and <primary2> is the backup primary’s IPv4 address or computer name:
tabadmin failoverprimary --primary <primary1> --secondary
<primary2>
Version 8.1.4 and later: Enter the following command, using either the computer