Version

    Example of 2 Node Cluster Configuration

    Basic 2-nodes Cluster Configuration
    2-nodes Cluster with Proxied Access to Database
    2-nodes Cluster with Load Balancer

    This section contains examples of CloverDX Cluster nodes configuration. We assume that the user "clover" is running the JVM process and the license will be uploaded manually in the web GUI. In addition it is necessary to configure:

    • Sharing or replication of the file system directory which the property "sandboxes.home" is pointing to. E.g. on Unix-like systems it would be typically /home/[username]/CloverDX/sandboxes.

    • The connection to the same database from both nodes.

    Basic 2-nodes Cluster Configuration

    This example describes a simple Cluster: each node has a direct connection to a database.

    Configuration of 2-nodes Cluster, each node has access to a database

    Figure 44.1. Configuration of 2-nodes Cluster, each node has access to a database


    Configuration of Node 1 on 192.168.1.131

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://192.168.1.200/clover_db?charSet=UTF-8
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    jdbc.username=clover
    jdbc.password=clover
    
    cluster.enabled=true
    cluster.node.id=node01
    cluster.http.url=http://192.168.1.131:8080/clover
    cluster.jgroups.bind_address=192.168.1.131
    cluster.jgroups.start_port=7800
    cluster.jgroups.tcpping.initial_hosts=192.168.1.132[7800]
    
    cluster.group.name=TheCloverCluster1
    
    sandboxes.home=/home/clover/shared_sandboxes

    Configuration of Node 2 on 192.168.1.132

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://192.168.1.200/clover_db?charSet=UTF-8
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    jdbc.username=clover
    jdbc.password=clover
    
    cluster.enabled=true
    cluster.node.id=node02
    cluster.http.url=http://192.168.1.132:8080/clover
    cluster.jgroups.bind_address=192.168.1.132
    cluster.jgroups.start_port=7800
    cluster.jgroups.tcpping.initial_hosts=192.168.1.131[7800]
    
    cluster.group.name=TheCloverCluster1
    
    sandboxes.home=/home/clover/shared_sandboxes

    The configuration is done in a properties file. The file can be placed either on a default or specified location.

    2-nodes Cluster with Proxied Access to Database

    This Cluster configuration is similar to the previous one, but only one node has direct access to a database. The node2 has to use node1 as a proxy.

    Configuration of 2-nodes Cluster, one node without direct access to database

    Figure 44.2. Configuration of 2-nodes Cluster, one node without direct access to database


    Configuration of Node 1 on 192.168.1.131

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://192.168.1.200/clover_db?charSet=UTF-8
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    jdbc.username=clover
    jdbc.password=clover
    
    cluster.enabled=true
    cluster.node.id=node01
    cluster.http.url=http://192.168.1.131:8080/clover
    cluster.jgroups.bind_address=192.168.1.131
    cluster.jgroups.start_port=7800
    
    cluster.group.name=TheCloverCluster2
    
    sandboxes.home=/home/clover/shared_sandboxes

    Configuration of Node 2 on 192.168.1.132

    cluster.datasource.type=remote                             (1)
    cluster.datasource.delegate.nodeIds=node01
    
    cluster.enabled=true
    cluster.node.id=node02
    cluster.http.url=http://192.168.1.132:8080/clover
    cluster.jgroups.bind_address=192.168.1.132
    cluster.jgroups.start_port=7800
    cluster.jgroups.tcpping.initial_hosts=192.168.1.131[7800]
    
    cluster.group.name=TheCloverCluster2
    
    sandboxes.home=/home/clover/shared_sandboxes

    (1)

    These two lines describe access to database via another node.

    2-nodes Cluster with Load Balancer

    If you use an external load balancer, the configuration of CloverDX Cluster will be same as in the first example.

    Configuration of 2-nodes Cluster with load balancer

    Figure 44.3. Configuration of 2-nodes Cluster with load balancer


    The cluster.http.url and cluster.jgroups.bind_address are URLs of particular Cluster nodes even if you use a load balancer.

    Configuration of Node 1 on 192.168.1.131

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://192.168.1.200/clover_db?charSet=UTF-8
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    jdbc.username=clover
    jdbc.password=clover
    
    cluster.enabled=true
    cluster.node.id=node01
    cluster.http.url=http://192.168.1.131:8080/clover
    cluster.jgroups.bind_address=192.168.1.131
    cluster.jgroups.start_port=7800
    cluster.jgroups.tcpping.initial_hosts=192.168.1.132[7800]
    
    cluster.group.name=TheCloverCluster3
    
    sandboxes.home=/home/clover/shared_sandboxes

    Configuration of Node 2 on 192.168.1.132

    jdbc.driverClassName=org.postgresql.Driver
    jdbc.url=jdbc:postgresql://192.168.1.200/clover_db?charSet=UTF-8
    jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
    jdbc.username=clover
    jdbc.password=clover
    
    cluster.enabled=true
    cluster.node.id=node02
    cluster.http.url=http://192.168.1.132:8080/clover
    cluster.jgroups.bind_address=192.168.1.132
    cluster.jgroups.start_port=7800
    cluster.jgroups.tcpping.initial_hosts=192.168.1.131[7800]
    
    cluster.group.name=TheCloverCluster3
    
    sandboxes.home=/home/clover/shared_sandboxes