how to find out if rebalance is in progress in the cluster?

classic Classic list List threaded Threaded
4 messages Options
novacean.alex novacean.alex
Reply | Threaded
Open this post in threaded view
|

how to find out if rebalance is in progress in the cluster?

Hi, is there a way to find out if there is a rebalance process going on in
the cluster?

What i am trying to do is the following:
- i have a cluster of 3 server noded active in kubernetes
- when 1 node gets restarted i want to be able to check in an init container
if a rebalance process is in progress
- in the init container i was thinking to have an ignite client node
connecting to the cluster or something else that would tell me if there is
or not a rebalance process in progress
- if it is, don't start the restarted node yet



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: how to find out if rebalance is in progress in the cluster?

Hello!

I think you can listen for REBALANCE_STARTED/REBALANCE_STOPPED events.

Just don't forget to turn them 'on' in nodes' configurations.

Regards,
--
Ilya Kasnacheev


пн, 11 нояб. 2019 г. в 09:51, novacean.alex <[hidden email]>:
Hi, is there a way to find out if there is a rebalance process going on in
the cluster?

What i am trying to do is the following:
- i have a cluster of 3 server noded active in kubernetes
- when 1 node gets restarted i want to be able to check in an init container
if a rebalance process is in progress
- in the init container i was thinking to have an ignite client node
connecting to the cluster or something else that would tell me if there is
or not a rebalance process in progress
- if it is, don't start the restarted node yet



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
novacean.alex novacean.alex
Reply | Threaded
Open this post in threaded view
|

Re: how to find out if rebalance is in progress in the cluster?

Hi,

Are these events published on every node if rebalance is happening,
including the supplier node for the rebalance process?

My use case is something like this:

- when one node gets restarted, the first thing that is fired at startup is
the init container which would have an ignite client that will connect to
the cluster (the cluster now is formed from two nodes only)
- if between these two nodes that are now the whole cluster a rebalance is
in progress(1 node is supplier and 1 node is demander) i want to make the
node that is restarting to wait until that rebalance is finished

Also i don't know if the event listening is the best approach as i've found
this  issue <https://issues.apache.org/jira/browse/IGNITE-3362>   with the
EVT_CACHE_REBALANCE_STOPPED event and i would need to know for sure that
when that event is published i can tell the restarting node to start.

Thanks,
Alex.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: how to find out if rebalance is in progress in the cluster?

Hello!

I think STARTED will be fired on all nodes, but only demander nodes will spend time before STOPPED is sent.

So you should probably listen to events from all nodes, not just to local ones.

Regards,
--
Ilya Kasnacheev


пт, 15 нояб. 2019 г. в 11:18, novacean.alex <[hidden email]>:
Hi,

Are these events published on every node if rebalance is happening,
including the supplier node for the rebalance process?

My use case is something like this:

- when one node gets restarted, the first thing that is fired at startup is
the init container which would have an ignite client that will connect to
the cluster (the cluster now is formed from two nodes only)
- if between these two nodes that are now the whole cluster a rebalance is
in progress(1 node is supplier and 1 node is demander) i want to make the
node that is restarting to wait until that rebalance is finished

Also i don't know if the event listening is the best approach as i've found
this  issue <https://issues.apache.org/jira/browse/IGNITE-3362>   with the
EVT_CACHE_REBALANCE_STOPPED event and i would need to know for sure that
when that event is published i can tell the restarting node to start.

Thanks,
Alex.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/