假设公司 ABC 开发了移动应用程序,现在想设置部署运行环境来服务于该移动应用程序。最初,移动部署包含 10000 台设备并会在将来逐渐增多。因此,客户希望容错和负载平衡环境能够处理当前负载,并且易于扩展以便将来处理更多的移动部署。基于移动应用程序的数据同步特性,客户确定需要以下配置:
因为公司使用 IIS 作为其 web 服务器,所以使用中继服务器的 IIS 版本。
每个中继服务器都部署在它自己的计算机上。使用两台主机名为 rs1.abc.com 和 rs2.abc.com 的计算机。
每个 MobiLink 服务器都部署在它自己的计算机上。这两个 MobiLink 服务器命名为 ml1 和 ml2,并属于名为 abc.mobilink 的后端服务器群。
可使用主机名 www.abc.com 寻址负载平衡器。
为最大程度地保证安全性,连接到中继服务器的所有客户端和出站启动器都使用 HTTPS。我们假定所有 Web 服务器都配备有知名证书颁发机构 (CA) 颁发的证书,并且所有后端服务器计算机的标准证书存储库中都有相应的受信任根证书。
第一步是创建中继服务器配置文件。
包含配置的文件名必须是 rs.config。对于此特定方案,使用以下配置文件:
# # Options # [options] verbosity = 1 # # Define the Relay Server farm # [relay_server] host = rs1.abc.com [relay_server] host = rs2.abc.com # # Define the MobiLink backend server farm # [backend_farm] id = abc.mobilink client_security = on backend_security = on # # List MobiLink servers that are connecting to the Relay Server farm # [backend_server] farm = abc.mobilink id = ml1 token = mltoken1 [backend_server] farm = abc.mobilink id = ml2 token=mltoken2 |
将配置文件 rs.config 以及中继服务器组件部署到两台运行中继服务器的计算机上。
在正在运行 MobiLink 服务器的两台计算机上启动 MobiLink 服务器,然后使用以下命令启动相应的出站启动器。
在运行 id 为 ml1 的 MobiLink 服务器的计算机上:
mlsrv11 -x http -z ml1 -ss <other ML options> rsoe -f abc.mobilink -id ml1 -t mltoken1 -cr "host=www.abc.com;port=443;https=1" |
在运行 id 为 ml2 的 MobiLink 服务器的计算机上:
mlsrv11 -x http -z ml2 -ss <other ML options> rsoe -f abc.mobilink -id ml2 -t mltoken2 -cr "host=www.abc.com;port=443;https=1" |
所有服务器和出站启动器运行后,MobiLink 客户端能够使用以下连接信息连接到群:
HTTPS protocol
host www.abc.com
url_suffix /ias_relay_server/client/rs_client.dll/abc.mobilink
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |