Difference between primary node and replica node

difference between primary-replica node and primary -replica shards ?.
as mention on page link given below:


There is no such thing as a replica node.

But in the context of that link you have N DCs, which are really availability zones as it runs on AWS.
Then within any Elasticsearch cluster you have primary and replica shards that are spread across the nodes. So here you have two nodes and the shards are spread across them.

So in the case a DC (zone) becomes unavailable, you still have the data in other DCs thanks to the replica shards.

In Elasticsearch , There is a concept of primary and replica shards not a replica node.
for overcoming the issue of data loss this concept use replica feature i.e replicated all your index data to another node .

for more understanding of primary and replica shards you can follow the below link:


All shards and index occupies disk space for size allocation, so How Ram size will effect cluster for shard size allocation.

Using Cluster update settings API , you can manage the allocation of shards to nodes .
follow the url:


I think i was not clear with my points,lets take some e.g.
I have 2 nodes with (200GB Disk space +8Gb RAM) for each node .So
1)what will be max index size for one index only setup?
2)what will be max shard size for (5 primary+1 replica )=10 total shard for 2 node cluster?

value of maximum shard size and index will depend on the nature of document being indexed, indexing rate, search queries and search query rate.
also, shard size depends on how much space is allocated to ES. which can also b edited as per user requirement.

In ./bin/elasticsearch file , allocation of heap size of elasticsearch i mentioned which can be edited as per your requirement.
the only limit is the disk space of your server, but if your index is growing too fast you should think about having more replica servers.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.