Wednesday, September 08, 2010
Search Minimize
Print  
Archive Minimize
Print  
Knowledgebase Minimize
Aug27

Written by:tswebadmin
8/27/2009 11:23 AM 

 

For backup to work the following is needed:

1) A pair of gateways, one is designated as primary the other as secondary.

2) Both gw services must run under some account that provides access to the other.

3) A tcp/ip connection between the gw pair.
Also make sure that if you use a firewall following is set:
-Allow applications CSPNT.EXE and CSPCFG.EXE to pass the firewall.
-Allo the heartbeat TCP port to pass the firewall (default port 9000).

4) Optionally a extra lan cable between the two gateways, this gives some protection against lan failures.
 

5) Make sure the 'Startup Parameters' from both gateways is set correctly.
You can access these parameters using the 'Comms Server Pro Configurator' program.
Right click the specific computer and select 'Startup Parameters...' from the menu.
In the dialog box you can control the 'Mode' in the bottom area.
Please make sure following is configured:
-For the primary gateway:
 Mode='Master'
-For the secondary gateway:
 Mode='Slave'
 Master Wait Mode='Wait specific time' set to 30 seconds.

6) The clients must be configured to automatically reconnect to one or the other gateway. For XAPI clients this is done by setting the ip addresses of both gw's in the xapi32.ini file (or use broadcast). For soap clients you either need to have the ip addresses of both gw's resolve to a single host name or have both gw addresses in the connect string.
 

 

To test a primary/secondary configuration following tests can be performed.

1) Open the configuration from the primary gateway, using the 'Comms Server Pro Configurator' program. When you open the 'This Server' node you should see both gateways (primary and secondary). Start both gateways by selecting the root node, and clicking the 'Start' button. The primary traffic light should turn green, and the secondary yellow. Now try to activate the passive gateway (yellow traffic light) by selecting it, and clicking the 'Activate' button. For a small moment both traffic lights will turn green, but directly after this the primary should become yellow, and the secondary green.

2) It's also important to check using the server monitor program. Most important is to check whether the heartbeat between the primary and secondary gateway is working. Select the 'Backup info' node from the primary gateway. Check in the right screen the counter 'Partner time last heartbeat'. This counter shows in milliseconds how long it was since the last heartbeat was received. This counter should go up until a value from around 10000 is reached, then it should go back to a small value. This indicates that every 10 seconds a heartbeat is received.

Non technical explaination.

With the CSPNT configurator create a backup configuration, when setup properly the configuration is automatically replicated between the primary and the secondry gateway. Then start both gateways. During startup the gw determines if there is already a partner gw active, when it is it will start in a passive state. If the gw is the only one it will start in a active state. Both gw's are constantly monitoring each others status, this is done via a heartbeat channel ( a tcp/ip connection ). When the active gw crashes or its quality status comes below a certain threshold the passive gw will automatically takeover. As the active gw is either crashed or taken to a passive state all its clients will be disconnected. Its then upto the clients to reconnect to the newly activated gw. Depending on the type of client this process is fully automatic and should take little time.

Automatic switchover can be configured to switch on various conditions;
- Partner is in error
- Partner is stopped
- Partner is paused
- Partner status is below threshold. ( e.g. upline is down )

Its also possible to use only manual swith over.

Backup status can be monitored with the servermonitor application.


Technical explaination of the backup implementation in the gateway:

6.3. Backup implementation
The backup implementation standard uses the SCM interface to monitor whether the backup gateway is still alive. This interface only provides redundancy for the full container. A second level of backup can be via the XAPI channel, for this to work each object must supply a quality of service variable which can be retrieved via the standard management channel. The container itself has the same variable, the container determines the value of this variable by summing the qualities of service of the contained objects using some weight factor.
This allows automatic switchover in case of line failures etc. Each object that wants to participate in the quality of service measurement needs to implement the following counters:

QualityOfService 0 to 100 %
LowThreshold If Quality of service falls below this value then recommended to switch over
HighThreshold If better then high switch back
ResourceUsage 0 to 100 % is percentage of users version configured users.
Weight 0 to 100 is a measurement of the relative importance of this object, if zero, it’s not counted, 100 is maximum.

The container sums the counters using the following formula:

ConQS = (5 * 100 + Obj1.QS * W1 + Obj2.QS * W2 …. + Objn * Wn ) / (5 + W1 + W2 + Wn)

Objx.QS = The objects QualityOfService counter Wx = Is the weight factor supplied by the objects, this normally comes from the configuration. It would also be possible to use the ResourceUsage as a weight factor, although the object may not know this in a larger context.
The constants (5 * 100) is the Quality of service of the container it zelf, it’s weight is 5. Using this still gives a quality of 100 % if all objects have their weights configured at 100 %.

The backup process now can use the SCM status together whit the quality of service as a switch over signal.

Future enhancements may allow switchover of single objects based on their quality of service. Also load sharing is possible by looking at the ResourceUsage counters, this measures the number of users versus the maximum number of users, or the current message throughput versus the maximum throughput.
Counter ID’s:

QualityOfService - 200
LowThreshold - 201
HighThreshold - 202
ResourceUsage - 203
Weight - 204

They should be placed under GlobalInfo ! All counters are single byte values, normal ranging from 0 to 100.

----

You may also have a look at the configurators online help, it also has some info on backup.

Tags:
Copyright 2009 by Travsys BV Terms Of UsePrivacy Statement