Difference between primary node and replica node


(Tushar Sharma) #1

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

https://www.elastic.co/cloud/as-a-service/pricing


(Mark Walkom) #2

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.


(poojagupta) #3

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:
https://www.elastic.co/guide/en/elasticsearch/guide/current/_how_primary_and_replica_shards_interact.html


(Tushar Sharma) #4

Thanks


(Tushar Sharma) #5

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


(poojagupta) #6

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

https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-allocator.html


(Tushar Sharma) #7

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?


(poojagupta) #8

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.


(system) #9

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