Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To prevent this problem, all Carbon-based products use Deployment Synchronizer (DepSync) to ensure the same status is maintained across all nodes in the cluster. It maintains a central repository of the <PRODUCT_HOME>/repository/deployment/server folder, which is where deployment configurations are stored for all Carbon-based products, and uses that repository to synchronize the nodes.

 

A product's repository typically contains user-uploaded service archives, modules, service metadata, scheduled tasks etc. These artifacts are typically shared across multiples nodes in a cluster. Therefore, in a clustered environment, the artifact repository (in WSO2 products, by default, it is <product-home>/repository/deployment/server) should be in-sync between all the cluster nodes, in order to maintain consistency. This synchronization functionality is provided by the following feature in the WSO2 feature repository: 

Name: WSO2 Carbon - Deployment Synchronizer Feature 
Identifier: org.wso2.carbon.deployment.synchronizer.feature.group 

 

If it is not included in your product by default, you can add by installing the above feature using the instructions given in section, Feature Management . 

In summary, the WSO2 Deployment Synchronizer has the following use cases: 

  • Maintaining an up-to-date backup of the artifact repository.
  • Sharing a single artifact repository among multiple servers in a cluster.
  • Enforcing artifact updates to be deployed on a server at runtime.

 

Currently, the WSO2 Deployment Synchronizer (DepSync) uses an SVN-based repository for storing shared deployment artifacts. The Subversion repository is used to sync the contents in the sync directory (the axis2 repo directory, <PRODUCT_HOME>/repository/deployment/server, by default). This method is efficient and high-performant. The synchronization process is as follows: 

  • When changes to the contents of axis2 repo directory are present, the Read-Write nodes commit those to the Subversion repository.
  • Then, this node sends a cluster message to all other (slave) nodes specifying the repo is updated.
  • When the slave nodes receive the message, they update their axis2 repo directory with what's in the svn repository.

...