Disable re balancing if one node is down

Imagine a case where I have

  • 3(AWS) Nodes
  • 1 Index (lest call it friends) with 3 shards and 1 replica.

Name Conventions
S1 (Index friends primary shard 1)
S2 (Index friends primary shard 2)
S3 (Index friends primary shard 3)
R1 (Replica of Shard 1)
R2 (Replica of Shard 2)
R3 (Replica of Shard 3)

Lets say that Node1 has (S1 R2) and is the master
Node2 has (S2 R3)
Node3 has (S3 R1)

Now if due to connection failure Node 2 goes down.
Load balancing will happen and
Node 1 will promote the replica (R2) as primary and new replica for (R2)
will be created in Node3
Finally after load balancing it will be like
Node1 has (S1 S2, R3)
Node3 has (S3 R1, R2)

During this re balancing heavy IO operations happen and the Elastic search
health will become red -> yellow then green.

My requirement is that if Node 2 is down the nodes must not re balance.
I am ok if the results on query shows results from only shard S1 and S3.
And when Node 2 is back again no re balancing should happen.

Is this possible..if yes how.
Thanks is advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f2cfcc49-3b92-4b0f-a071-eb0b6e5ac387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

That's not possible, you either rebalance everything or nothing.

On 25 March 2015 at 18:47, Cyril Cherian cyril@mobomo.com wrote:

Imagine a case where I have

  • 3(AWS) Nodes
  • 1 Index (lest call it friends) with 3 shards and 1 replica.

Name Conventions
S1 (Index friends primary shard 1)
S2 (Index friends primary shard 2)
S3 (Index friends primary shard 3)
R1 (Replica of Shard 1)
R2 (Replica of Shard 2)
R3 (Replica of Shard 3)

Lets say that Node1 has (S1 R2) and is the master
Node2 has (S2 R3)
Node3 has (S3 R1)

Now if due to connection failure Node 2 goes down.
Load balancing will happen and
Node 1 will promote the replica (R2) as primary and new replica for (R2)
will be created in Node3
Finally after load balancing it will be like
Node1 has (S1 S2, R3)
Node3 has (S3 R1, R2)

During this re balancing heavy IO operations happen and the Elastic search
health will become red -> yellow then green.

My requirement is that if Node 2 is down the nodes must not re balance.
I am ok if the results on query shows results from only shard S1 and S3.
And when Node 2 is back again no re balancing should happen.

Is this possible..if yes how.
Thanks is advance.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f2cfcc49-3b92-4b0f-a071-eb0b6e5ac387%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f2cfcc49-3b92-4b0f-a071-eb0b6e5ac387%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8T2gw02N%2BAjXHGFjyJzxs7DzhDEhTRRtkc3fCC%3DVmD7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

You can get a some reallocation control through
cluster.routing.allocation.enable but getting the exact config you mention
I don't think is possible. You could write a cluster-watching script that
does what you describe though using these settings. One problem you will
have is when node2 comes back it needs to re-sync it's replicas from the
masters, but you can stop balancing after one node goes down via
cluster.routing.allocation.enable

On Wednesday, March 25, 2015 at 3:47:38 AM UTC-4, Cyril Cherian wrote:

Imagine a case where I have

  • 3(AWS) Nodes
  • 1 Index (lest call it friends) with 3 shards and 1 replica.

Name Conventions
S1 (Index friends primary shard 1)
S2 (Index friends primary shard 2)
S3 (Index friends primary shard 3)
R1 (Replica of Shard 1)
R2 (Replica of Shard 2)
R3 (Replica of Shard 3)

Lets say that Node1 has (S1 R2) and is the master
Node2 has (S2 R3)
Node3 has (S3 R1)

Now if due to connection failure Node 2 goes down.
Load balancing will happen and
Node 1 will promote the replica (R2) as primary and new replica for (R2)
will be created in Node3
Finally after load balancing it will be like
Node1 has (S1 S2, R3)
Node3 has (S3 R1, R2)

During this re balancing heavy IO operations happen and the Elastic search
health will become red -> yellow then green.

My requirement is that if Node 2 is down the nodes must not re balance.
I am ok if the results on query shows results from only shard S1 and S3.
And when Node 2 is back again no re balancing should happen.

Is this possible..if yes how.
Thanks is advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0a4ce39d-134b-4cd8-a49b-3785a06ae3d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.