helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishore g <g.kish...@gmail.com>
Subject Re: Custom Controller
Date Wed, 24 Jul 2013 06:29:32 GMT
You can write a custom rebalancer. But its not clear to me how you would
differentiate between node coming up for the first time v/s current master
failing. In general, its a good idea to avoid having logic that depends on
the order of cluster events that happen in the cluster. This will make it
difficult to scale the cluster or increase the number of partitions.

How about this, Node2 always starts in disabled mode (call
admin.disableNode at startup before it connects to the cluster. After Node1
becomes the master, as part of Slave-->Master transition enables Node2.
This guarantees that Node2 always waits until it sees Node1 as Master.

Will this work for you ?

Kishore G

On Tue, Jul 23, 2013 at 9:17 PM, Ming Fang <mingfang@mac.com> wrote:

> Hi
> I have a particular use case and wish to hear your expert opinion.
> We currently have a MASTER and SLAVE cluster using Manual Placement, eg
> Node1 is always MASTER and Node2 is always SLAVE.
> The problem is during startup, if Node2 starts up first then the
> Controller would transition it to MASTER.
> I want to change this behavior such that the Controller would wait for
> Node1 to come up, even if Node2 is already up.
> Another way to look at it is that the Controller would only make Node2 a
> MASTER if and only if there was a known failure in Node1.
> One example of a known failure is for Node1 to come up, becomes MASTER,
> and then later crashes.
> Question is where is the correct place to implement something like this?
> Should I...
> a)Extend GenericHelixController?
> b)Implement a customer Rebalancer?
> c)or something else.
> Thanks for your help.
> --ming

View raw message