zero_coding zero_coding - 6 months ago 82
Java Question

What does setClusterHost mean in vertx?

I am trying to learn vertx and downloaded a sample from github.

Consider following code snippet:

VertxOptions options = new VertxOptions().setClustered(true).setClusterHost("localhost");

How can I imagine how the localhost will be clustered?


If you run your example in multiple JVM's on the same host, then these JVM's will be clustered.

If you want to run the JVM's on different hosts, then it is important to specify the ip and not localhost.

Here is the Troubelshoot section of the vert.x doc on this topic:

If you are interested in playing around with the clustering on one host / different hosts you can use this application