Part 3 Series of Elasticsearch Cluster on Spot Instances with zero downtime in App?
Elasticsearch Note for cluster State:
Red state: There is no primary shard in the cluster for indexing ,writing and searching
Yellow State: There is primary shard for indexing and searching but not replica shards
available of primary shards.
Green state: Primary shard and replica shard are in good state for indexing and
searching.
Question:What happen when we increase the number of replicas:
curl -XPUT 'localhost:9200/testing/_settings?pretty' -H 'Content-Type: application/json' -d'
{
"index" : {
"number_of_replicas" : 2
}
}
'
As you can see above the replica 2’s for primary shards will be unassigned as we
have 2 data node cluster so let’s increase the data node in our setup.
have 2 data node cluster so let’s increase the data node in our setup.
So from our conclusion we can see that by increasing the number of replicas in our
case we can handle 2 node failure for our 3 data node cluster which remains same
as with 1 replica but we can increase your search performance by increasing the
number of replicas as data will be highly available on more nodes.
case we can handle 2 node failure for our 3 data node cluster which remains same
as with 1 replica but we can increase your search performance by increasing the
number of replicas as data will be highly available on more nodes.
Comments
Post a Comment