vertx-zookeeper icon indicating copy to clipboard operation
vertx-zookeeper copied to clipboard

Passing user defined Node id through cmd

Open nabhosal opened this issue 8 years ago • 5 comments

Hi, We are deploying multiple vertx vertical using zookeeper cluster manager.... on zookeeper servers we need to track each vertical....but zookeeper assign some random UUID to each vertical. So mapping each vertical on zookeeper become difficult. It will be better if we can pass node id through cmd

nabhosal avatar Jul 20 '17 13:07 nabhosal

Does other vertx's cluster implementation provide such way? As i know the interface of vertx doesn't provide such method. by the way you can get a verticle's deploymentID with callback handler in method vertx.deploy

vertx.deployVerticle("com.mycompany.MyOrderProcessorVerticle", res -> {
  if (res.succeeded()) {
   //get deploymentID
    System.out.println("Deployment id is: " + res.result());
  } else {
    System.out.println("Deployment failed!");
  }
});

stream-iori avatar Jul 21 '17 02:07 stream-iori

Hazelcast shows membership info, so we don't need to track it through node id.... unfortunately zookeeper don't show such info.. only possible way is to track it on zookeeper server. zookeeper don't use deployment id to map node id. So we don't know which deployment id map to corresponding zookeeper node id on zookeeper servers.

nabhosal avatar Jul 21 '17 05:07 nabhosal

my idea is #60

takeseem avatar Jul 26 '17 08:07 takeseem

I have fixes for above requirement, which we tested and deployed in our production setup...I would like to push those changes.... can someone help me on this...

nabhosal avatar Jul 26 '17 10:07 nabhosal

Copy pasted from issue 60 @stream1984 , We do agree its not a good idea to take nodeID from users. But, consider a deployment having a large number of service running then it becomes difficult for dev-ops to track which service is down even though we use zk watcher since UUID are non-intuitive. We faced this issue in initial days, and we resolve by creating unique intuitive nodeIds. Refer this fork, we are using this in our production https://github.com/nabhosal/vertx-zookeeper

nabhosal avatar Sep 13 '19 12:09 nabhosal