0
votes

Trying with VoltDB cluster, created a cluster of 2 nodes with k=1

Cluster initialization was successful, both the nodes are up.

Now, how do i connect to this cluster, i could not find any documentation to setup single IP for cluster.

Will the client connect to particular node IP or cluster IP ?

I am using VoltDB community edition.

2

2 Answers

0
votes

In general, you can connect to one node, or to multiple nodes. For simple usage, one node is fine. For a client application where you want lower latency and higher throughput, you should connect to all of the nodes in the cluster. See Connecting to the VoltDB Database for the java client, and in particular section 6.1.2 on using the auto-connecting client which enables you to connect to only one node and the client will automatically connect to all of the other nodes.

For command-line access, see the sqlcmd reference:

--servers=server-id[,...] Specifies the network address of one or more nodes in the database cluster. By default, sqlcmd attempts to connect to a database on localhost.

Disclosure: I work at VoltDB.

0
votes

If you wish to connect to a single node try

jdbc:voltdb://192.168.1.5:<port>

as the connection URL or if you wish to connect to cluster try

jdbc:voltdb://192.168.1.5:<port>,192.168.1.6:<port>,<any additional nodes you might have in your cluster>

as the connection url.