Just getting started with ElasticSearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the patch
for the Ghost vulnerability. We turned off reallocation, shut down the
individual nodes, then rebooted each node and turned reallocation back on.
We have 12 shards per index and one replica index. After the reboot of all
the nodes, we ended up with some nodes with three primary shards and one
replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our primary
and replica shards? Would like to have 2 primary shards and 2 replica shard
per node.
Also, is there a way to change a shard from a replica to a primary shard
without doing a relocation?
It doesn't matter as long as your shard count is balanced.
The only difference between a primary and a replica is a flag that makes
the cluster see it as a primary. Any queries will use a primary or a
replica without concern.
Just getting started with Elasticsearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the patch
for the Ghost vulnerability. We turned off reallocation, shut down the
individual nodes, then rebooted each node and turned reallocation back on.
We have 12 shards per index and one replica index. After the reboot of all
the nodes, we ended up with some nodes with three primary shards and one
replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our primary
and replica shards? Would like to have 2 primary shards and 2 replica shard
per node.
Also, is there a way to change a shard from a replica to a primary shard
without doing a relocation?
I've found one way only to rebalance the cluster - move a primary shard to
another node use reroute API, but it takes a while.
Is it possible to promote a replica shard as a primary?
On Tuesday, February 10, 2015 at 6:35:07 PM UTC-5, Mark Walkom wrote:
It doesn't matter as long as your shard count is balanced.
The only difference between a primary and a replica is a flag that makes
the cluster see it as a primary. Any queries will use a primary or a
replica without concern.
Just getting started with Elasticsearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the
patch for the Ghost vulnerability. We turned off reallocation, shut down
the individual nodes, then rebooted each node and turned reallocation back
on.
We have 12 shards per index and one replica index. After the reboot of
all the nodes, we ended up with some nodes with three primary shards and
one replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our
primary and replica shards? Would like to have 2 primary shards and 2
replica shard per node.
Also, is there a way to change a shard from a replica to a primary shard
without doing a relocation?
Mark, to you point "...Any queries will use a primary or a replica without
concern."
I understand the indexing request will always be sent to the primary shard
first but aren't queries sent to Primary (just in case replica is
momentarily out of sync).
It doesn't matter as long as your shard count is balanced.
The only difference between a primary and a replica is a flag that makes
the cluster see it as a primary. Any queries will use a primary or a
replica without concern.
Just getting started with Elasticsearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the
patch for the Ghost vulnerability. We turned off reallocation, shut down
the individual nodes, then rebooted each node and turned reallocation back
on.
We have 12 shards per index and one replica index. After the reboot of
all the nodes, we ended up with some nodes with three primary shards and
one replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our
primary and replica shards? Would like to have 2 primary shards and 2
replica shard per node.
Also, is there a way to change a shard from a replica to a primary shard
without doing a relocation?
Mark, to you point "...Any queries will use a primary or a replica without
concern."
I understand the indexing request will always be sent to the primary shard
first but aren't queries sent to Primary (just in case replica is
momentarily out of sync).
It doesn't matter as long as your shard count is balanced.
The only difference between a primary and a replica is a flag that makes
the cluster see it as a primary. Any queries will use a primary or a
replica without concern.
Just getting started with Elasticsearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the
patch for the Ghost vulnerability. We turned off reallocation, shut down
the individual nodes, then rebooted each node and turned reallocation back
on.
We have 12 shards per index and one replica index. After the reboot of
all the nodes, we ended up with some nodes with three primary shards and
one replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our
primary and replica shards? Would like to have 2 primary shards and 2
replica shard per node.
Also, is there a way to change a shard from a replica to a primary shard
without doing a relocation?
Mark, to you point "...Any queries will use a primary or a replica
without concern."
I understand the indexing request will always be sent to the primary
shard first but aren't queries sent to Primary (just in case replica is
momentarily out of sync).
It doesn't matter as long as your shard count is balanced.
The only difference between a primary and a replica is a flag that makes
the cluster see it as a primary. Any queries will use a primary or a
replica without concern.
Just getting started with Elasticsearch, and I'm taking on a couple of
tasks as I get more familiar with it.
We recently restarted the six nodes in our ES cluster to perform the
patch for the Ghost vulnerability. We turned off reallocation, shut down
the individual nodes, then rebooted each node and turned reallocation back
on.
We have 12 shards per index and one replica index. After the reboot of
all the nodes, we ended up with some nodes with three primary shards and
one replica index and some with three replicas and one primary shard.
Is there a way to prevent this mismatch in the distribution of our
primary and replica shards? Would like to have 2 primary shards and 2
replica shard per node.
Also, is there a way to change a shard from a replica to a primary
shard without doing a relocation?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.