Often the next step after seeing that you can run the sample applications on your local machine is to move to a cluster to fully experience the scalable nature of VoltDB performance. This is also easy to do.
To run a VoltDB database on a cluster, you run the server process on all nodes of the cluster making only three changes to the startup procedure:
Specify the number of nodes in the cluster
deployment.xml file by changing the
hostcount attribute from "1" to the number of servers you plan to use. For example, assuming you plan
on using three nodes (ServerA, ServerB, and ServerC), change the deployment file as follows:
<cluster hostcount="3" sitesperhost="2" kfactor="0" />
Select one of the nodes as the "host" and specify its address on the command line when starting each of the server processes. Note that all nodes specify the same host. So, if we select ServerA as the host from our previous example, you include host ServerA in the command line when starting all three nodes.
You can do this by editing the run.sh script that comes with the sample application and changing the definition of the environment variable LEADER at the beginning of the file, like so:
VOLTDB="../../bin/voltdb" VOLTCOMPILER="../../bin/voltcompiler" LICENSE="../../voltdb/license.xml" LEADER="ServerA"
Finally, change the run.sh so the client application makes connections to all of the nodes in the cluster rather
than just one. This helps maximize the throughput by avoiding any network bottlenecks. You specify the nodes to connect
to as an argument to the client application. Edit the run.sh, then find and replace all references to the
--servers argument with a list of server nodes. For example:
--display-interval=5 \ --duration=120 \ --servers=ServerA,ServerB,ServerC \ --port=21212 \ --pool-size=100000 \