ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Cherkasov <michael.cherka...@gmail.com>
Subject Re: Best practise for setting Ignite.Active to true when using persistence layer in Ignite 2.1
Date Thu, 03 Aug 2017 09:27:15 GMT
Hi Raymond,

Unfortunately right now there's no auto-activation, restarting cluster is
like rare event that should be controlled
manually. However you can listen for EVT_NODE_JOINED event, when all nodes
in place you can activate a cluster.

And you only need this if you have ignite persistence turn on and you have
some data on the disk.

Thanks,
Mikhail.

2017-08-03 6:58 GMT+03:00 Raymond Wilson <raymond_wilson@trimble.com>:

> Michael,
>
>
>
> Is there a reference implementation in Ignite 2.1 for an agent that
> listens to topology changes to decide when to set active to true?
>
>
>
> Thanks,
>
> Raymond.
>
>
>
> *From:* Michael Cherkasov [mailto:michael.cherkasov@gmail.com]
> *Sent:* Thursday, August 3, 2017 1:25 AM
>
> *To:* user@ignite.apache.org
> *Subject:* Re: Best practise for setting Ignite.Active to true when using
> persistence layer in Ignite 2.1
>
>
>
> >Does this mean we have to listen to events of server nodes going up and
> down and activate and deactivate the cluster?
>
>
>
> No, you need to deactivate cluster when you going to shutdown the whole
> cluster. And when you return cluster back to  online, you need to wait when
> all nodes are in place and then activate it.
>
>
>
>
>
> 2017-08-02 16:22 GMT+03:00 Rohan Shetty <rohan.shetty@gmail.com>:
>
> Does this mean we have to listen to events of server nodes going up and
> down and activate and deactivate the cluster?
>
>
>
> On Wed, Aug 2, 2017 at 3:18 PM, Michael Cherkasov <
> michael.cherkasov@gmail.com> wrote:
>
> when all nodes are up, so in latest topology snapshot you can see servers
> count == servers count you run, then cluster can be activated.
>
>
>
> 2017-08-02 0:51 GMT+03:00 Raymond Wilson <raymond_wilson@trimble.com>:
>
> Hi Mikhail,
>
>
>
> Thanks for the clarifications.
>
>
>
> Yes, I knew setting active was only required when using the persistence
> layer, which is the topic of the question J
>
>
>
> I was interested if there were best practices or approaches for
> determining when the grid had fully initialized. I realise this is somewhat
> application specific, but was looking for an established pattern before I
> invented one myself.
>
>
>
> In my case I have an affinity function that responds to topology changes
> which intrinsically would know when it had a ‘quorum’. Is this a typical
> place for setting active to true.
>
>
>
> Thanks,
>
> Raymond.
>
>
>
> *From:* Mikhail Cherkasov [mailto:mcherkasov@gridgain.com]
> *Sent:* Tuesday, August 1, 2017 11:59 PM
> *To:* user@ignite.apache.org
> *Subject:* Re: Best practise for setting Ignite.Active to true when using
> persistence layer in Ignite 2.1
>
>
>
> Hi Raymond,
>
>
>
> Ignite cluster is inactive on startup only if persistence is enabled. This
> is done to avoid unnecessary partition exchanges between nodes,
>
> for example, if you have 3 nodes and 1 backup enabled and you start only 2
> of 3 nodes, then they will treat the third node as dead and start process
>
> of restoring data from backup and rebalance data to spread them among 2
> nodes, when you add the missed third node back the process will be repeated.
>
>
>
> So we start cluster as in active. When all nodes are started and ready, so
> no cluster topology changes aren't expected, you should activate cluster.
>
>
>
> Also when you turn off cluster, some nodes can still accept request for
> data update and other nodes won't see it, so understand which node has the
> latest
>
> data we need to start all nodes first and only then activate cluster.
>
>
>
> Thanks,
>
> Mikhail.
>
>
>
> On Tue, Aug 1, 2017 at 5:05 AM, Raymond Wilson <raymond_wilson@trimble.com>
> wrote:
>
> Hi,
>
>
>
> I am experimenting with a POC looking into using the Ignite persistence
> layer.
>
>
>
> One aspect of this is setting the grid to be ‘Active’ after all cache grid
> nodes have instantiated.
>
>
>
> In practical terms, what is the best practice for ensuring the cluster is
> running and in a good state to be set to active? What is the downside of
> setting active to true before all grid nodes are running?
>
>
>
> Thanks,
>
> Raymond.
>
>
>
>
>
>
>
> --
>
> Thanks,
>
> Mikhail.
>
>
>
>
>
>
>

Mime
View raw message