Part 2 Series of Elasticsearch Cluster on Spot Instances with zero downtime in App?
Elasticsearch Data node setup :
Data node are the nodes/instance where our index data will reside.There is two things to
consider for data nodes while creating an index i.e
1.Number of shards:
How to divide our index data into number of shards so that data can be retrieved in fast
paced manner. It help in sharding data to different nodes so that we can scale it well.
2.Number of Replicas:
Number of Copies of primary shards are called number of replicas
Let’s take an example to understand it’s concept :
How many node failure can be possible if we have 3 node data cluster with 5 shards and 1 replica.
Elasticsearch notes:
Primary shards and its replica will not be on same node.
If we delete one node from our cluster then :
Our cluster will re-balance our lost replicas and move to existing nodes ,for time-being the cluster becomes yellow as you can see below for unassigned shards.
Once rebalancing is completed our cluster back to green state.
Answer for our Question:
Our cluster can sustain two node failure if we have 3 data node with index
(5 shards and 1 replica) and hence our cluster will be in yellow state.
Comments
Post a Comment