Netscaler High Availability Synchronization - IMP

Website Visitors:

High availability synchronization is the process by which configurations are kept identical between the appliances. It is not the process that runs individual commands on the secondary appliance after successful completion on the primary appliance, that is called Command Propagation and while the two are similar in function, they perform different functions.

High availability synchronization is used as a failsafe method of keeping configurations between the appliances synchronized whether the command propagation is successful or not.

High availability synchronization is completed by a process called nssync over TCP port 3008 or 3010. The process starts during system startup and sleeps on a secondary appliance. It uses RPC remote GET ioctls to collect the running configuration from the primary appliance and applies it to the secondary appliance.

It is important to note that the configuration synchronized is the running configuration and not the saved ns.conf file. The obtained configuration file is stored in /tmp/ns_com_cfg.conf file and the secondary appliance runs the clear ns config –force extended command and then begins to load the new configuration. This process is easily identifiable in the logs, as shown in the following snippet:

<> 01/16/2010:13:15:56 GMT ns2-ha : UI CMD_EXECUTED : User #nsinternal# - Remote_ip - Command “clear ns config -force extended+” - Status “Success”

High availability synchronization is automatically triggered in the following circumstances:

  • When the nssync process starts during startup, if the appliance is a secondary appliance and it is aware of the existence of the primary appliance, synchronization is initiated and the process goes to sleep. If it is not aware of the primary appliance, the process immediately goes to sleep.

  • When synchronization is not disabled manually or automatically and the high availability engine detects a configuration mismatch it starts the nssync process which then collects the remote configuration.

Usually synchronization is initiated in the second scenario when the nssync process starts during startup. The high availability setup is in the INIT state and is therefore unaware of the existence of the primary appliance. After the high availability state machine detects the primary appliance and a configuration mismatch, it starts the nssync process to collect and apply the remote configuration.

Forced Synchronization

The NetScaler appliance also supports a user forced synchronization of the appliances that are part of a high availability setup. The administrator is able to force the synchronization from either the primary or secondary appliance. The configuration always comes from the primary appliance no matter which appliance the administrator executes the command on. If synchronization is already in process when the forced synchronization is initiated, the appliance responds with an error message. Forced synchronization also fails in the following situations:

  • When you try to force synchronization on a standalone appliance
  • When the secondary appliance is disabled or unreachable
  • When high availability synchronization is disabled on the secondary appliance

An administrator can force synchronization from the Graphical User Interface (GUI) or command line interface of the appliance.

Force Synchronization From the GUI

To initiate force synchronization from the Configuration utility of the NetScaler appliance, complete the following procedure:

  1. Expand the System node.
  2. Select the High Availability node.
  3. Select the Nodes tab.
  4. Click Force Synchronization.

Force Synchronization From the CLI

To initiate force synchronization from the Command Line Interface of a NetScaler appliance, run the following command: >force ha sync

It is important to note that this command only synchronizes the running configuration as previously noted and has no effect on the saved configuration or other files that might need to be synchronized between the primary and secondary appliances.

To understand what files and Network setting are synced, refer to the linked provided in “Additional Resources”

Additional Resources

Automatic HA synchronization is enabled by default on each node in an HA pair. You can enable or disable it on either node using the following command: set HA node -haSync DISABLED | ENABLED

CTX109013 – Troubleshooting the NetScaler High Availability Issues
CTX138748 – File Synchronization in NetScaler High Availability Setup
Citrix Documentation – Synchronizing Configuration Files in a High Availability Setup
Citrix Documentation – High Availability FAQs
Citrix Documentation – Troubleshooting High Availability Issues
Citrix Documentation – Considerations for a High Availability Setup
For any more information on High availability, please refer to the subsections in this Citrix Doc


Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: