Announcement

Collapse
No announcement yet.

How to run two nodes on the same host?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to run two nodes on the same host?

    Hi all,

    Is it possible to run more than one node on the same host? Where do I specify port?

    Thanks,
    Arkadiy

  • #2
    re: How to run two nodes on the same host?

    Arkadiy,

    You can run multiple VoltDB processes on the same physical server. Keep in mind that we cannot guarantee k-safety in that configuration so you should do so with your k-factor = 0 or in a non-production environment.

    You need to startup your servers with unique client ports (on each server) which can be set by starting VoltDB with the "port" command line argument, as in:
    Code:
    $ java -Xmx2048m -Djava.library.path=~/voltdb-1.2.01/voltdb/ \
    org.voltdb.VoltDB  catalog mycatalog.jar deployment deployment.xml \
    port 12345
    More information is available in our documentation at ServerConfigServerPort

    -Tim

    Comment


    • #3
      OK, thanks. How do I supply

      Originally posted by tcallaghan View Post
      Arkadiy,

      You can run multiple VoltDB processes on the same physical server. Keep in mind that we cannot guarantee k-safety in that configuration so you should do so with your k-factor = 0 or in a non-production environment.

      You need to startup your servers with unique client ports (on each server) which can be set by starting VoltDB with the "port" command line argument, as in:
      OK, thanks.

      How do I supply leader's port in the deployment.xml? :?

      Comment


      • #4
        re: How to run two nodes on the same host?

        Originally posted by vertleyb View Post
        OK, thanks.

        How do I supply leader's port in the deployment.xml? :?
        You supply each VoltDB server process a port when you start them, the port you are providing is the on that clients will use to connect to the server. There is another port that VoltDB uses for servers to communicate with each other, VoltDB automatically selects a unique port for this purpose.
        So, if you wanted to start two servers you'd do the following in one ssh session on a server (since port is not supplied VoltDB uses the default of 21212):

        $ java -Xmx512m -Djava.library.path=~/voltdb-1.2.03/voltdb/ org.voltdb.VoltDB catalog mycatalog.jar deployment deployment.xml

        Then on the same server you'd start another VoltDB server process using (this process would be listening for client connections on 12345:

        $ java -Xmx512m -Djava.library.path=~/voltdb-1.2.03/voltdb/ org.voltdb.VoltDB catalog mycatalog.jar deployment deployment.xml port 12345

        In this configuration (if this was your entire cluster), you'd need to make sure your deployment.xml contains hostcount="2" and sitesperhost= the number of partitions you want for each process.

        -Tim

        Comment


        • #5
          but then, who is the leader

          Originally posted by tcallaghan View Post
          You supply each VoltDB server process a port when you start them, the port you are providing is the on that clients will use to connect to the server. There is another port that VoltDB uses for servers to communicate with each other, VoltDB automatically selects a unique port for this purpose.
          So, if you wanted to start two servers you'd do the following in one ssh session on a server (since port is not supplied VoltDB uses the default of 21212):...-Tim
          Thanks. What I still don't understand how VoltDB determines who is the leader. The "leader" parameter in deployment.xml contains the host only, which is same for all nodes...

          What am I missing?

          Comment


          • #6
            If you starting multiple volt

            If you starting multiple volt processes on one host, and that host is configured to be the cluster setup leader, each process will attempt to bind to the leader port. The first will win and become the leader. The remaining processes will fail to bind and will attempt to connect as non-leader nodes.

            Once setup is complete, the choice of leader is irrelevant - it is just a simplification for cluster setup.

            *--Ryan.

            Comment


            • #7
              re: How to run two nodes on the same host?

              Originally posted by vertleyb View Post
              Thanks. What I still don't understand how VoltDB determines who is the leader. The "leader" parameter in deployment.xml contains the host only, which is same for all nodes...

              What am I missing?
              Oh.

              The "leader" parameter in deployment.xml is there so everyone knows where to "check-in" on startup (they all have to check-in with the leader). The first VoltDB process on the leader node uses a known/fixed port to listen for connections from other servers in your cluster. Everyone is connecting to the leader node on that port.

              -Tim

              Comment


              • #8
                RE: If you starting multiple volt

                Originally posted by rbetts View Post
                If you starting multiple volt processes on one host, and that host is configured to be the cluster setup leader, each process will attempt to bind to the leader port. The first will win and become the leader. The remaining processes will fail to bind and will attempt to connect as non-leader nodes.

                Once setup is complete, the choice of leader is irrelevant - it is just a simplification for cluster setup.

                *--Ryan.
                OK, thanks.

                Comment


                • #9
                  For anyone looking at this thread - the instructions for running multiple copies of VoltDB on the same server have changed. This thread contains up to date instructions:

                  https://forum.voltdb.com/forum/voltd...-NUMA-machine=

                  Comment

                  Working...
                  X