Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » 中继服务器 » 中继服务器与 MobiLink 配合使用

 

方案示例

必须先配置和部署包含相应设置的配置文件,然后才能将 MobiLink 客户端连接到群。

前提条件

在本方案中,使用 Microsoft IIS 版本的中继服务器。

上下文和注释

假设公司 ABC 开发了移动应用程序,现在想设置部署运行环境来服务于该移动应用程序。最初,移动部署包含 10000 台设备并会在将来逐渐增多。因此,客户希望容错和负载平衡环境能够处理当前负载,并且易于扩展以便将来处理更多的移动部署。基于移动应用程序的数据同步特性,客户确定需要以下配置:

  • 2 个 MobiLink 服务器
  • 2 个中继服务器
  • 1 个负载平衡器
  • 每个中继服务器都部署在它自己的计算机上。使用两台主机名为 rs1.abc.comrs2.abc.com 的计算机。

  • 每个 MobiLink 服务器都部署在它自己的计算机上。这两个 MobiLink 服务器命名为 ml1ml2,并属于名为 abc.mobilink 的后端服务器群。

  • 可使用主机名 www.abc.com 寻址负载平衡器。

  • 为最大程度地保证安全性,连接到中继服务器的所有客户端和出站启动器都使用 HTTPS。假定所有 Web 服务器都配备有知名证书颁发机构 (CA) 颁发的证书,并且所有后端服务器计算机的标准证书存储库中都有相应的受信任根证书。

 ♦ 设置中继服务器群
  1. 第一步是创建中继服务器配置文件。

    包含配置的文件名必须是 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
    
  2. 将配置文件 rs.config 以及中继服务器组件部署到两台运行中继服务器的计算机上。

  3. 在使用集成出站启动器运行 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 选项

结果

所有服务器和出站启动器运行后,MobiLink 客户端能够使用以下连接信息连接到群:

  • HTTPS   protocol

  • host   www.abc.com

  • url_suffix   /rs/client/rs_client.dll/abc.mobilink

下一步

无。

 另请参见