November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Synchronization Simplified

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)

sync_disable
Figure 1
       As part of the tuning process you wants to set the JVM heap size of Node1/AppSrv01 to Min 256/ Max 512. Let us look at the Dmgr (Figure 2) and Node1 (Figure 3) configurations before setting the values.

Both these configuration files does not have an entry for jvm heap size (Linux OS) as there is no value set for it currently

jvm_master_config_after_jvmset
Figure 2
jvm_master_config_before_jvmset
Figure 3

Now let us set the heap size min value to 256 and max to 512 as below (Figure 4)

jvm_value_set
Figure 4

Make sure that you are not selecting  “synchronize changes with nodes” option (Figure 5) and then save the changes to master repository

sync_disable
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)

jvm_master_config_after_jvmset
Figure 6

As we disabled synchronization the jvm configuration file of Node1 will not be having that entry (Figure 7)

jvm_node_after_jvmset_before_sysnc
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).

jvm_node_after_jvmset_after_sysnc
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

This is normally a partial synchronization but the very first synchronization after the node agent start will be a full synchronization.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>