helloworld
helloworld

Reputation: 3

what is the impact of shard number in elasticsearch?

I am curious about the impact of #shards in Elasticsearch. Particularly, I am looking for the pros and cons for having big #shards and small #shards.

For example, I have a two-node cluster. Assuming replica is one, for one index, should I create two shards which are spread across these two nodes? Or should I use the default i.e., 5 shards? My thinking is the first one.

It seems to me there is no reason to have more than one share per node per index as one Lucene instance can have better caching than a few Lucene instances.

Edit: Let's say I have only one node and want to create one index. How does the shard number affect the performance in this case? My thinking is I should have only one shard in such a case. Is that right?

Upvotes: 0

Views: 483

Answers (1)

avr
avr

Reputation: 4883

You can find the answer in the elasticsearch documentation here

Upvotes: 0

Related Questions