必须先配置和部署包含相应设置的配置文件,然后才能将 MobiLink 客户端连接到群。
前提条件
在本方案中,使用 Microsoft IIS 版本的中继服务器。
上下文和注释
假设公司 ABC 开发了移动应用程序,现在想设置部署运行环境来服务于该移动应用程序。最初,移动部署包含 10000 台设备并会在将来逐渐增多。因此,客户希望容错和负载平衡环境能够处理当前负载,并且易于扩展以便将来处理更多的移动部署。基于移动应用程序的数据同步特性,客户确定需要以下配置:
每个中继服务器都部署在它自己的计算机上。使用两台主机名为 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 back-end 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 服务器的计算机上:
mlsrv12 -x oe<config=oe1.txt> -zs ml1 <other ML options> |
其中 oe1.txt = -f abc.mobilink -id ml1 -t mltoken1 -cr "host=www.abc.com;port=443;https=1"
在运行 id 为 ml2 的 MobiLink 服务器的计算机上:
mlsrv12 -x oe<config=oe2.txt> -zs ml2 <other ML options> |
其中 oe2.txt = -f abc.mobilink -id ml2 -t mltoken2 -cr "host=www.abc.com;port=443;https=1"
请参见-x mlsrv12 选项。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |