Synchronization Simplified
Synchronization Simplified
Synchronization is a process of updating the nodes with master configuration repository changes.The network deployment scenario of WebSphere application server contains multiple nodes managed by a Dmgr and Dmgr holds the master repository of configurations. Any updates or changes through Dmr will be saved in the master configuration and the nodes will be aware of these changes only after the synchronization.
The synchronization is always from Dmgr to Nodes and it never happens vise versa. If you made any changes from the node side it will be cleared during next synchronization process.
A Simple example
Consider below scenario.
OS —– Linux
HostA —– Dmgr
HostB ——Node1 — AppSrv01
Suggest to stop the Nodeagent process in Node1
Autosync should be disabled (figure1)
Both these configuration files does not have an entry for jvm heap size (Linux OS) as there is no value set for it currently
Figure 2 |
Now let us set the heap size min value to 256 and max to 512 as below (Figure 4)
Figure 4 |
Make sure that you are not selecting “synchronize changes with nodes” option (Figure 5) and then save the changes to master repository
Figure 5 |
Now let us examine the master configuration repository (Dmgr) for the chnages we made. There you can see the newly created heap size entries (Figure 6)
Figure 6 |
As we disabled synchronization the jvm configuration file of Node1 will not be having that entry (Figure 7)
Figure 7 |
Now synchronize the master configuration repository changes with nodes by either a syncNode.sh/bat or by starting the nodes and then synching it from console, This updates the JVM configuration file of Node1 with the latest updates of master configuration (Figure 8).
Figure 8 |
Another simple and practical test for better understanding of synchronization
Test #1
Go under the config directory of dmgr (master repository) and create a file
Perform a full synchronization
Navigate to the config directory of node, It will be having the file which you created in master configuration.
The reason for this is during the full sync process it found a file in the master repository and which is not there in the nodes so full sync process transfer this file to nodes
Test #2
Go under the node config directory, create a file.
Perform a full synchrinization from dmgr
Navigate to the config directory of the node and check for the file which you created, the file will not be there.
The reason for this is, During the full synchronization process it found a file in the node repository (which you created) and which is not there in the master repository so full sync process removes the file from node to make the configuration in sync with master repository.
Types of Synchronization
There are two types of Synchronization
1.) Partial Synchronization : Here only the configuraion file(s) which has changed at the Dmgr level will be Synchronized with nodes.
2.) Full Synchronization: This will Synchronize the entire master repository with the nodes.
Possible ways of Synchronization
1. syncNode.sh /syncNode.bat command from the nodes.
2. from the admin console or wsadmin
3. When node agent starts
4. During federationn process.(addNode.sh)
5. Auto/scheduled sync.
syncNode.sh /syncNode.bat command from the nodes.
Usage: syncNode dmgr_host [dmgr_port] [-conntype ] [-stopservers]
[-restart] [-quiet] [-nowait] [-logfile ] [-replacelog]
[-trace] [-username ] [-password ]
[-localusername ] [-localpassword ]
[-profileName ] [-help]
Normally use it as: syncNode.sh -username -password
Note:- The node agent should be down to execute syncNode and this is always a full synchronization.
From the admin console or wsadmin
This can be either a partial synchronization or full synchronization, It depends on the option selected.
When node agent starts
If this option is enabled node agent will synchronize with master repository during the startup process. The very first synchronization after startup will be a Full Synchronization and the consicutive synchronization will be Partial Synchronization.
During federationn process
This is always a full synchronization
Auto/scheduled sync
Recent Comments