Relay Server (rs.config) Configuration File

The rs.config file defines the relay server farm, including peer relay servers, back-end server farms and their server nodes.

Sybase recommends that you generate the file in Sybase Control Center. Then, if there are additional changes you need to make, you can implement those manually.

  • For IIS: C:\Inetpub\wwwroot\IAS_relay_server\Server\rs.config
  • For Apache: <Apache_Home>/modules/rs.config
This file contains these properties:
Definition Property Default Possible values Description
Relay server options The setup options for the relay server.
  shared_mem 10 any integer Specifies the maximum amount of shared memory that the relay server uses for state tracking. The default is 10 megabytes. This property is optional.
start No auto, no, full path
Specifies how State Manager is started:
  • auto – The State Manager is started automatically using the State Manager command line defaults.
  • no — The State Manager is started externally as a Windows service.
  • full path — Specify the full path to the State Manager executable (rshost).
verbosity 1

0 to log errors only. Use this logging level for deployment.

1 to set session-level logging. Provides an overview of a synchronization session.

2 to request-level logging. Provides a more detailed view of HTTP requests within a synchronization session.

Specifies the verbosity level for the relay server log.
Relay server peers Identifies all hosts on which peer relay servers are installed. Each new definition starts with [relay server]. Add as many [relay server] sections as required for your deployment.
  enable yes yes|no Specifies whether to allow connections to the peers.
host relayserver.sybase.com Any string that does not use special characters or spaces. either the relay server host name or the host name of the load balancer (if one is used in your environment). Device clients use the host name to establish connections. Other relay servers can use the host name to identify peers if a load balancer is not used.
http_port 80 Any valid port number that is not already in use. the HTTP port for relay server connections.
https_port 443 Any valid port number that is not already in use. the secure HTTP port for relay server connections.
description None Any string. description for the relay server.
Backend farm IThe backend farm section specifies the properties of a back-end server farm. A back-end server farm is a group of homogenous back-end servers. A client making a request through the relay server farm must specify the back-end server farm it is targeting. There is one backend farm section for each back-end server farm. This section is identified by the backend_farm keyword.
enable yes yes|no Specifies whether to allow connections from this back-end server farm.
id None Any string that does not use special characters or spaces. the server farm for which the relay server manages requests. This property is case-sensitive. The configured value must match the value defined for the RSOE or the connection fails.
client_security on on|off (Optional). This property can only be set manually. For details on this property, see http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.11.0.1/mlserver_en11/ml-relayserver-config-file.html.
backend_security on on|off (Optional) This property can only be set manually. For details on this property, see http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.11.0.1/mlserver_en11/ml-relayserver-config-file.html
  type None Any string (Optional) This property can only be set manually. For details on this property, see http://infocenter.sybase.com/help/topic/com.sybase.help.sqlanywhere.11.0.1/mlserver_en11/ml-relayserver-config-file.html
  description None Any string describes relay server farm usage.
Backend servers       Identifies backend Unwired Server synchronization components installed on the corporate LAN. Each new definition starts with [backend_server]. Add as many [backend_server] sections as required for your deployment.
  enable yes yes|no Specifies whether to allow connections from this back-end server.
  farm None Any string that does not use special characters or spaces. The ID of the farm the server node is part of.
  id None Any string that does not use special characters or spaces. the node string that identifies the backend replication or messaging based cluster. Combine one or more Unwired Servers to create a single server node. This property is case-sensitive. The configured value must match the value defined for the RSOE or the connection fails.
  mac None Any typical MAC address. The MAC address of the server node. Only type a value if you want relay server to use MAC verification. Only define one MAC address. To determine what address to use, find the address in the RSOE.log file.
  token None Any string that does not use special characters or spaces. the security token used by the server node to authenticate the back-end server connection with relay server. Each node requires a unique token: specify a unique string to a maximum of 2048 characters.
  description None Any string (Optional) A description of the server node.
Comment out any of the optional properties with the pound sign (#) character.

To apply the changes you make to this file, run this command from the directory where the rs.config file is located:

rshost -f rs.config -q -qc -u

Example: N+2 Architecture Configuration

This file is an example of how a optimally redundant N+2 production relay server architecture is configured. There are two relay servers in the Relay Server farm: RS1.sybase.com and RS2.sybase.com. There are also two backend server types: Afaria and SUP. The Afaria system has two backend servers: Afaria1.sybase.com and Afaria2.sybase.com. The Unwired Platform system has one backend server: SUP.sybase.com.

Assume relay servers use Microsoft IIS, and that this Web server is configured with the following paths:
  • \ias_relay_server\client – the install location of rs_client.dll.
  • \ias_relay_server\server – the install location of rs_server.dll, rshost.exe, and rs.config.
#----------------------------
# Relay server with auto start option
#-------------------------------------
[options]
start = no
verbosity = 1

Start State Manager externally as a Windows service.

#--------------------
# Relay server peers
#--------------------
[relay_server]
enable          = yes
host            = RS1.sybase.com
http_port       = 80
https_port      = 443
description     = Machine #1 in RS farm

[relay_server]
enable          = yes
host            = RS2.sybase.com
http_port       = 80
https_port      = 443
description     = Machine #2 in RS farm
Because there are two relay servers in the relay server farm, both instances need to be defined in the peer list. This list is used by the RSOE to establish a connection with each relay server node in the farm.
#---------------
# Backend farms
#---------------
[backend_farm]
enable          = yes
id              = AfariaFarm
client_security = on
backend_security= on
description     = This is the definition for the Afaria farm.

[backend_farm]
enable          = yes
id              = SUPFarm
client_security = on
backend_security= on
description     = This is the definition for the SUP farm.
There are two different types of farms in this example. One is an Unwired Platform farm, and the other is an Afaria farm. Each farm requires an entry in the backend farms section, and each must have a unique Farm ID.
#-----------------
# Backend servers
#-----------------
[backend_server]
enable   = yes
farm     = AfariaFarm
id       =  for Afaria1.sybase.com
mac      = 01-23-45-67-89-ab
token    = 7b2493b0-d0d4-464f-b0de-24643e1e0feb

[backend_server]
enable   = yes
farm     = AfariaFarm
id       =  for Afaria1.sybase.com
mac      = 01-23-45-67-89-ac
token    = de1aac83-a653-4e0f-8a6c-0a161a6ee407

[backend_server]
enable   = yes
farm     = SUPFarm
id       =  for SUP.sybase.com
mac      = 01-23-45-67-89-ad
token    = 621ece03-9246-4da7-99e3-c07c7599031c
There are three backend server nodes in this scenario. Two of the backend servers are part of the AfariaFarm and the third backend server is part of the SUPFarm. Afaria backend servers use the Transmitter ID as the Server ID. Unwired Platform typically uses the machine name as the Server ID. The Server ID must be unique for each backend server entry.
Note:
When the relay server architecture has been deployed and configured, clients would connect to these severs differently:
  • For AfariaFarm connections use: url_suffix=/ias_relay_server/client/rs_client.dll/AfariaFarm
  • For SUPFarm connections use: url_suffix=/ias_relay_server/client/rs_client.dll/SUPFarm
Related tasks
Configuring a Multinode Relay Server Cluster with Sybase Control Center
Configuring and Enabling Relay Server Logging