0
votes

To increase search performance, I tried to add a replica to my cluster. Initially, I measured a response time of around 700ms for a specific request with a single node with a primary shard. After adding a node and a replica shard to the cluster, it takes averagely 2000ms to get the result of the request (so it almost tripled).

I'm using these configs for the replica :

cluster.name: findmyfpstore
node.name: fmfs_r1
node.master: false
network.host: ...
http.port: ...
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ['...']
index.number_of_shards: 1
index.number_of_replicas: 1

Am I doing something wrong ? Feel free to tell me if you need more informations, I'm a beginner at ElasticSearch.

Thanks a lot!

EDIT: I tried with 2 shards, 1 replica, it doesn't change much

1
How many Elasticsearch nodes are you running? What sort of specs are these machines? Are you using SSD?Or Weinberger
Hi, there are two nodes, each of the nodes are running on one different server (32go RAM, 8 cores). They don't use SSD.azekirel555
Since you're using a single shard, I'm not sure you would see any significant performance boost by adding a replica, however, you also shouldn't get any performance hit because of it. What happens if you use 2 shards and 1 replica?Or Weinberger
Are multiple shards useful if the data volume is really low ? I only have < 1k documents and it probably won't be higher. I'm trying it and I'll give you the results as soon as possible.azekirel555
What is your document size? Can you share your query? Maybe we can improve that..Or Weinberger

1 Answers

1
votes

There are a lot of elements that can affect the performance of your cluster and query speeds.

I suggest you follow Elasticsearch's Production Deployment document, this will give you a lot of insight on how to properly configure your cluster.