Redundancy and Failover
  • 30 Jan 2024
  • PDF

Redundancy and Failover

  • PDF

Article summary

Multiple Instances

Multiple instances of the CTC .NET Remoting HDA Server can be set up using different configuration files. This makes it possible to host .NET Remoting servers on multiple I.P. addresses for hosts with multiple NICS, as well as to host multiple servers using different ports on a single I.P. address. Hosting multiple instances on a single I.P. address allows for pointing PARCview sources or clients to a specific instance of the .NET Remoting Server.

Configuring the .NET Remoting console in FireDaemon is similar to other PARCserver applications, and has an optional command-line parameter for specifying the file to use for configuration. By default, the console will use the server.config file that is used by the non-interactive version of the .NET Remoting server. Optionally, a “-config=configFile” parameter can be entered in the Parameters field to load a specific Remoting config file, which must exist in the same folder as the CTCNETHDAConsole.exe.

Running multiple instances of the .NET Remoting Console requires making a copy of the server.config for each instance, and adding a “–config=customserver.config” parameter for each instance in the FireDaemon configuration. Typically only one line in the server.config will need to be modified:

<channeltype="Belikov.GenuineChannels.GenuineTcp.GenuineTcpChannel, GenuineChannels"MaxTimeSpanToReconnect="5000"MaxContentSize="100000000"MaxTotalSize="100000000"port="8085" />

The default instance of the .NET Remoting Server uses port 8085, and reserves the next 199 ports for usage by local client applications. This means that additional instances of the .NET Remoting console must not use a port within 200 ports of any other Remoting instance. For example, if binding to port 9000, ports 9000-9199 must not be used by another Remoting server. Available ports will differ depending on the applications installed on the server, but typically, with the exception of port 10,000 (used by BackupExec), most ports above port 9,000 should be available. The easiest way to find what ports are being used is to open a command prompt and run “netstat –a”.

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers is also a good place to check ports used by common applications. Once you find a port range that should be free, enter it in place of the default port=”8085”. To bind to a specific I.P. address, add an additional option inside the channel definition, for interface=”0.0.0.0”, where 0.0.0.0 is the I.P. of the NIC to bind to. If there is a conflict obtaining the specified port, the console will write out an error message at startup, and shut itself down a few seconds later. Detailed log information is written out to the LogFiles subfolder below the CTCNETHDAConsole.exe.

If a port other than 8085 is used, each source that will be connecting to the server on the new port must be reconfigured in PARCview’s System Configuration. Instead of a HDA server in the form gtcphda://servername/ctc.opchda.1, you will need to use gtcphda://servername:port/ctc.opchda.1, where port is the port number entered in the server’s config file.

In addition to the .config file that contains the .NET configuration, there is also a CTCNETHDAConsole.exe.config file, which has additional configuration options such as the frequency to update the GUI with client and resource usage information. The default CTCNETHDAConsole.exe.config will likely be adequate for most sites and shouldn’t need to be modified.

Pooling

In addition to configuring multiple instances, CTC .Net Remoting HDA Servers can be pooled to help distribute the load across multiple processes and better utilize the large amount of memory available on most 64-bit servers. The pooled servers could either be on a single host server or spread across multiple servers.

This mode is an alternative option for handling redundant servers. By default, PARCview initially connects to the primary server (defined in the ctc_dssource table), and then sequentially fails over to whatever secondary servers are available (which are defined in the ctc_server table) whenever the connected server fails. Pooled mode will build a list containing the primary server plus all of the backup servers defined in ctc_server, and then randomly choose one of those to connect to. In the event the pooled server is unavailable or fails, it will choose another random server from the list to re-establish a connection to.

To configure that option, use the column in ctc_server table called “serverBackupMode”. If the value is set to “Pool”, updated PARCview clients will use the new behavior when they establish a connection to whatever serverUrl has pool set. If that column does not exist or is set to something other than pool, the old failover behavior will apply.

cid:image001.png@01CDCE5F.EF8A0FB0


Was this article helpful?

What's Next