This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Clustering Identity Server

Creating a cluster of WSO2 Identity Server instances is very similar to clustering other WSO2 products. To ensure that the instances share governance registry artifacts, you create a JDBC mount. At a high level, you take the following steps to cluster Identity Server:

  1. Install Identify Server on each node.
  2. Create the registry database.
  3. Configure the WSO2_CARBON_DB data source in <IS_HOME>/repository/conf/datasources/master-datasources.xml on node 1 to point to the registry database with the correct URL, username, password, and driver class name. For example:

    <datasource>
      <name>WSO2_CARBON_DB</name>
      <description>The datasource used for registry and user manager</description>
      <jndiConfig>
        <name>jdbc/WSO2CarbonDB</name>
      </jndiConfig>
      <definition type="RDBMS">
        <configuration>
          <url>jdbc:mysql://localhost:3306/reg_db</url>
          <username>regadmin</username>
          <password>regadmin</password>
          <driverClassName>com.mysql.jdbc.Driver</driverClassName>
          <maxActive>50</maxActive>
          <maxWait>60000</maxWait>
          <testOnBorrow>true</testOnBorrow>
          <validationQuery>SELECT 1</validationQuery>
          <validationInterval>30000</validationInterval>
        </configuration>
      </definition>
    </datasource>
  4. Enable clustering on node 1 in <IS_HOME>/repository/conf/axis2/axis2.xml by setting the clustering element to true:
    <clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="true">
  5. On node 2, open <IS_HOME>/repository/conf/registry.xml and add the following entries to configure access to the remote registry instance and to create the mount:

    <dbConfig name="wso2registry_registry">
      <dataSource>jdbc/WSO2CarbonDB</dataSource>
    </dbConfig>
    
    <remoteInstance url="https://localhost:9443/registry">
      <id>instanceid</id>
      <dbConfig>wso2registry_registry</dbConfig>
      <readOnly>false</readOnly>
      <enableCache>true</enableCache>
      <registryRoot>/</registryRoot>
    </remoteInstance>
    
    <mount path="/_system/config" overwrite="true">
      <instanceId>instanceid</instanceId>
      <targetPath>/_system/nodes</targetPath>
    </mount>
    <mount path="/_system/governance" overwrite="true">
      <instanceId>instanceid</instanceId>
      <targetPath>/_system/governance</targetPath>
    </mount>
  6. If both nodes are running on the same server, set the port offset. 
  7. Start the nodes and verify in the registry browser that the governance collection is shown with the symlink icon.

Â