zero_coding zero_coding - 1 year ago 142
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download