I have provisioned Elastic Cluster with 1 node and index has been divided into 5 shards, Later i have added another node into the cluster and it's by default shows 5 shards on new node, how this Shards mechanism works?

initially when we have 1 node it shows 5 shards then after adding another node its also shows 5 shards, it means total 10 shards? or or both nodes shows 5 shards each it means duplicate shards maintain on another node? it supposed shared among both nodes it mean node1 can have 3 and another node can have 2 shards, is that how it should work,?

it will be really helpful if someone can provide bit more in detail, thanks.

@vijayakrishna.rg, When you created your index that have 5 shards and 1 replica. Its means there will be total 10 shards 5 primary shards and 5 replica shards one for each primary shards. When you have only one node in your cluster your cluster health should be yellow. Because you don't have second node to assign replica shards. When you added 2nd node into your cluster the master node will distribute the primary shards and replica shards between 2 nodes. Each node may contain primary shards as well as replica shards.