CygNet Measurement > FMS Service > Replication and Data Synchronization > Configuring FMS Replication

Configuring FMS Replication

Replication is configured in the configuration file (CygNet\Services\FMS\fms.cfg) for each affected service. Depending on what role the service plays, different keywords will apply.

Required Configuration File Keywords for Replication

For each involved service, its replication behavior and relationship is defined by several keywords in the FMS configuration file.

Required Data Synchronization Keywords

In the Data Synchronization Keywords section of the configuration file, no replication is initially configured, and all data synchronization keywords in the configuration file are commented out. Uncomment only the applicable keywords necessary for each service, and enter appropriate values to define the replication relationships desired. See Data Synchronization Keywords in the FMS Configuration File Keywords topic for more information.

The following is an overview of the keywords that are appropriate for each replication service role you decide to set up.

Data Synchronization Keyword Master FMS Service DR Slave FMS Service Business Slave FMS Service

DS_MODE

Required

Required

Required

DS_ROLES

Required

Required

Required

DS_REPL_MASTER

N/A;

leave commented

Required

Required

DS_REPL_SLAVE

Required in replication mode, when designating a DR Slave service

N/A when designating Business Slave service(s); leave commented

N/A;

leave commented

N/A;

leave commented

DS_CHECK_INTERVAL

N/A;

leave commented

Required

Required

DS_DELAY_MAX

Required when in redundancy mode

Required when in redundancy mode

Required when in redundancy mode

DS_QUICK_DB_COMPARE

N/A;

leave commented

Optional

Optional

DS_BLACKOUT_START

N/A;

leave commented

Optional

Optional

DS_BLACKOUT_END

N/A;

leave commented

Optional

Optional

Required Database Info Keywords

In the Database Info Keywords section of the configuration file, the DATA_RETENTION keyword must also be properly specified.

See Database Info Keywords in the FMS Configuration File Keywords topic for more information.

The following is an overview of what the DATA_RETENTION keyword values mean for each replication service role you decide to set up.

Data Synchronization Keyword Master FMS Service DR Slave FMS Service Business Slave FMS Service

DATA_RETENTION

Required

Specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance.

Required

Specifies the number of days of data to be replicated from the Master service to the DR Slave service.

Note: The value must equal the value set for the Master FMS Service.

Also specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance.

Required

Specifies the number of days of data to be replicated from the Master service to the Business Slave service.

Note: If the value is different from the value of the Master FMS Service, the system will use the smaller of the two values.

Also specifies the number of days of data to be retained in the database, when expired device data is purged during database maintenance.

Back to top

Using the Quick Database Comparison Feature

You may optionally decide to copy the Master service database over to a Slave service prior to setting up replication, and then use the quick database comparison feature to save time.

Note: Use this keyword with caution, as it is possible to get a false positive on two databases that aren’t exactly the same.

Beginning replication from an existing FMS service could take a prohibitively long time, to run a line-by-line comparison against the potentially large size of an existing FMS database. If desired, to shorten the initial synchronization time for the replicated service, the database of the Master FMS service can be duplicated over to the replicated (Slave) site before starting the replicated service. You can then choose to enable the quick database comparison feature in the replicated service's configuration file, to allow the service to make a quick comparison and start the service.

To Enable Quick Database Comparison in a Replicated Slave Service

  1. On your host server, locate the configuration file for the FMS service(s) that will be your DR Slave or Business Slave service(s). Open the CygNet\Services\FMS folder and locate the fms.cfg file.
  2. Open the configuration file fms.cfg for the Slave service, locate the Data Synchronization Keywords section, and set the value of the DS_QUICK_DB_COMPARE keyword to TRUE.

Once the replicated service starts, a quick validation check will be done to verify that the two databases (Master and Slave) are equal. This will prevent a full row by row comparison of the two databases, which may take a long time on a large database.

Enabling Replication

Replication must be enabled and defined in the configuration file for each service that is part of the FMS replication relationship.

To Enable Replication

  1. On your host server, locate the configuration file for each service involved in the replication relationship. Open the CygNet\Services\FMS folder and locate the fms.cfg file.
  2. Master service - Open the configuration file fms.cfg of the Master service and, in the Data synchronization Keywords section, do the following.
  1. Set the value field of the DS_MODE keyword to REPLICATION.
  2. Set the value of DS_ROLES to REPL_MASTER.
  3. If you are defining a disaster recovery slave, set the value of the DS_REPL_SLAVE keyword. Type the [Domain]Site.Service for the DR Slave service into the value field.
  4. Set the value of the DS_CHECK_INTERVAL keyword to define the frequency at which the Master service will check for changes in the DR Slave service. Type the desired check interval value (in seconds) into the value field. This field cannot be left blank; it requires a value between 10 and 36000 seconds.
  1. DR Slave service - Open the configuration file fms.cfg of the DR Slave service and, in the Data synchronization Keywords section, do the following.
  1. Set the value field of the DS_MODE keyword to REPLICATION.
  2. Set the value of the DS_ROLES keyword to REPL_SLAVE_DR.
  3. Set the value of the DS_REPL_MASTER keyword. Type the [Domain]Site.Service for the Master service identified in step 2 into the value field.
  4. Set the value of the DS_CHECK_INTERVAL keyword to define the frequency at which the DR Slave service will check for changes in the Master service. Type the desired check interval value (in seconds) into the value field. This field cannot be left blank; it requires a value between 10 and 36000 seconds.
  5. If you want to enable the quick database comparison feature, set the value of the DS_QUICK_DB_COMPARE keyword to TRUE. If not specified, the default value will be FALSE. See Using the Quick Database Comparison Feature for more information.
  6. If you want to define a blackout period, during which no replication occurs, set the values for the DS_BLACKOUT_START and DS_BLACKOUT_END keywords. See Blacking Out Replication for more information.
  1. Business Slave service - Open the configuration file fms.cfg of each Business Slave service and, in the Data synchronization Keywords section, do the following.
  1. Set the value field of the DS_MODE keyword to REPLICATION.
  2. Set the value of DS_ROLES to REPL_SLAVE_BUSINESS.
  3. Set the value of the DS_REPL_MASTER keyword. Type the [Domain]Site.Service for the Master service identified in step 2 into the value field.
  4. Set the value of the DS_CHECK_INTERVAL keyword to define the frequency at which the Business Slave service will check for changes in the Master service. Type the desired check interval value (in seconds) into the value field. This field cannot be left blank; it requires a value between 10 and 36000 seconds.
  5. If you want to enable the quick database comparison feature, set the value of the DS_QUICK_DB_COMPARE keyword to TRUE. If not specified, the default value will be FALSE. See Using the Quick Database Comparison Feature for more information.
  6. If you want to define a blackout period, during which no replication occurs, set the values for the DS_BLACKOUT_START and DS_BLACKOUT_END keywords. See Blacking Out Replication for more information.

Blacking Out Replication

Since you will need to accommodate time required for database backups or other functions (e.g. your FMS service is configured to do a majority of data polls at a particular part of the contract day), it may be helpful to black out replication during such periods to prevent a performance burden on the system. Replication blackouts can optionally be configured in the configuration file of any slave service.

To Black Out Replication

  1. On your host server, locate the configuration file for each service for which you want a blackout scheduled. Open the CygNet\Services\FMS folder and locate the fms.cfg file.
  2. Open the configuration file fms.cfg of each Slave service for which you want a blackout scheduled, to define a time window during which no replication checks will be initiated. Appropriate values are in the form “HH:MM” in 24-hour time notation, for the host server.
  1. Set the value for the DS_BLACKOUT_START keyword to define the start time of the blackout window.
  2. Set the value for the DS_BLACKOUT_END keyword to define the end time of the blackout window.

Example

If your contract hour is 9 a.m. and polling generally takes under five hours, you might want a DS_BLACKOUT_START value of 09:00 and a DS_BLACKOUT_END value of 14:00.

Monitoring FMS Replication

To monitor replication status in the FMS Console window, use the F4:Repl view. The console view displays the current status of the replication, the amount of data replicated, the estimated amount to replicate, and other helpful information. See CygNet Console for more information.

Most of the data on this view is also available via CygNet Explorer, using service info keywords available in the Service Details View, or through SVCMON points.

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.