内容:

添加负载均衡器

  • 版本 :2022.1 及更高版本

您可以通过在多个节点上运行网关,并配置负载均衡器以跨网关分发请求来增强 Tableau Server 的可靠性。与存储库进程(可以是主动的或被动的)不同,所有网关进程都是主动的。如果群集中的一个网关不可用,负载均衡器将停止向其发送请求。您选择的负载均衡器算法决定了网关将如何路由客户端请求。

注意:如果您将使用 Kerberos 身份验证,则需要先为负载均衡器配置 Tableau Server,然后再配置适用于 Kerberos 的 Tableau Server。有关详细信息,请参阅配置 Kerberos

负载平衡器不支持 Windows SSPI 身份验证。

在将负载平衡器配置为使用 Tableau Server 时,请注意以下事项:

  • 已测试负载平衡器:具有多个网关的 Tableau Server 群集已使用 Apache 和 F5 负载平衡器进行了测试。

    如果您使用的是 Apache 负载平衡器并创建自定义管理视图,则需要直接连接到 Tableau Server 存储库。您无法通过负载均衡器进行连接。

  • Tableau Server URL:当负载平衡器位于 Tableau Server 群集前面时,Tableau Server 用户访问的 URL 属于负载平衡器,而不是初始的 Tableau Server 节点。

  • 单个负载均衡器终端节点:您必须为单个 URL 终端节点配置负载均衡器。您无法将不同的终端节点主机配置为重定向到同一 Tableau Server 部署。单个外部 URL 是在配置 Tableau Server 时定义的,如下面的过程所述。gateway.public.host

  • 受信任的主机设置:必须向 Tableau Server 将运行负载平衡器的计算机标识为受信任的主机。有关如何配置 Tableau 服务器,请参阅下面的过程。

  • 代理服务器配置:用于向 Tableau Server 标识负载平衡器的设置与用于标识代理服务器的设置相同。如果您的 Tableau Server 群集同时需要代理服务器和负载平衡器,则两者都必须使用 中定义的单个外部 URL,并且必须在 和 中指定所有代理服务器和负载平衡器。有关更多信息,请参阅 为 Tableau Server 配置代理gateway.public.hostgateway.trusted gateway.trusted_hosts

配置 Tableau Server 以使用负载平衡器

使用以下键值对为负载平衡器配置 Tableau Server。您可以使用 tsm 配置集命令单独设置这些值。

或者,使用本主题末尾的配置文件模板示例创建配置文件 json 文件。使用适当的值填充选项后,传递 json 文件并使用 tsm 命令应用设置。

负载均衡器配置键值对

本节中描述的键值对可以使用 tsm 配置集命令进行设置。设置完所有值后,运行以下命令:

tsm pending-changes apply

  • gateway.public.host

  • 价值:name

    该值是将用于通过负载均衡器访问 Tableau Server 的 URL。name

    例如,如果通过在浏览器地址栏中输入来访问 Tableau Server,请输入以下命令:tableau.example.com

    tsm configuration set -k gateway.public.host -v "tableau.example.com"

  • gateway.public.port

  • 价值:port_number

    默认情况下,Tableau 假定负载均衡器正在端口 80 上侦听外部通信。使用此键指定其他端口。

    例如,如果您的负载均衡器配置为 SSL 并侦听端口 443,请输入以下命令:

    tsm configuration set -k gateway.public.port -v "443"

  • 网关.可信

  • Value: server

    Specify the load balancer(s) IPv4 address or host name. If you are using an internal load balancer, you must use IP addresses, not host names.

    The value for can be a comma-separated list, for example:server

    tsm configuration set -k gateway.trusted -v "10.32.139.45, 10.32.139.46, 10.32.139.47"

    or

    tsm configuration set -k gateway.trusted -v "proxy1, proxy2, proxy3"

  • gateway.trusted_hosts

  • Value:

    Specify alternate names for the load balancer(s), 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:

    tsm configuration set -k gateway.trusted_hosts -v "name1, name2, name3"

    For example:

    tsm configuration set -k gateway.trusted_hosts -v "lb.example.com, lb, ftp.example.com, www.example.com"

    In most cases, if there are no alternate names for the load balancer, you may enter the same value for this key as you entered for the key.gateway.public.host

配置模板示例

您可以通过自定义以下配置模板示例并创建 configKey json 文件,在一次操作中配置所有设置。

请参阅上面的键值对说明,为您的组织自定义值。

{
 "configKeys": {
	"gateway.public.host": "tableau.example.com",
	"gateway.public.port": "443",
	"gateway.trusted": "proxy1, proxy2, proxy3",
	"gateway.trusted_hosts": "lb.example.com, lb, ftp.example.com, www.example.com"
	}
}

完成后,保存 json 文件。

使用 tsm 传递 json 文件以设置配置,然后通过运行以下命令应用设置:

tsm settings import -f /path/to/file.json

tsm pending-changes apply

有关使用配置密钥方案的详细信息,请参阅配置文件示例

返回页首