![cluster 2 nodes basic 3d simp](../figures/cluster-2-nodes-basic-3d_simp.png)
Example of 2-Node Cluster Configuration
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-Node Cluster Configuration
This example describes a simple Cluster: each node has a direct connection to a database.
![cluster 2 nodes basic 3d simp](../figures/cluster-2-nodes-basic-3d_simp.png)
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
A 2-Node Cluster with Load Balancer
If you use an external load balancer, the configuration of CloverDX Cluster will be same as in the first example.
![cluster 2 nodes load balancer 3d simp](../figures/cluster-2-nodes-load-balancer-3d_simp.png)
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