Starting Multiple Nodes

There are several use cases for using multiple nodes.

  • Additional nodes are created with the goal of scaling horizontally.
    For example, if you have three copysets, start the components in the following sequence:
    tibrealmserver
    tibdg -r http://localhost:8080 -s /<path>/three_copysets.tibdg
    tibdgkeeper -r http://localhost:8080 -n k1
    tibdgproxy -r http://localhost:8080 -n p1
    tibdgnode -r http://localhost:8080 -n s1
    tibdgnode -r http://localhost:8080 -n s2
    tibdgnode -r http://localhost:8080 -n s3
    Here <path> refers to the location where three_copysets.tibdg is stored. For a sample script, see three_copysets.tibdg.
  • Nodes are created as replicas of the copysets.
    For example, if you have one copyset and two replicas, start the components in the following sequence:
    tibrealmserver
    tibdg -r http://localhost:8080 -s /<path>/one_copyset_two_replicas.tibdg
    tibdgkeeper -r http://localhost:8080 -n k1
    tibdgproxy -r http://localhost:8080 -n p1
    tibdgnode -r http://localhost:8080 -n s1
    tibdgnode -r http://localhost:8080 -n s2
    Here <path> refers to the location where one_copyset_two_replicas.tibdg is stored. For a sample script, see one_copyset_two_replicas.tibdg.
Note: The sample scripts three_copysets.tibdg and one_copyset_two_replicas.tibdg create nodes and state keepers using the --dir option, for example:
node create --copyset set1 --dir ./s1_data s1
statekeeper create --dir ./k1_data k1
The nodes store the data that applications put in the data grid in the s1_data folder and the state keeper stores state information about the primary and secondary nodes in the k1_data folder.
Related reference