1
votes

we are using elastic for very efficient search but it seems to be taking ~800ms for one simple search.. this is when we hit directly using elastic API..

we have our own cluster with 3 nodes where one is as master and other two are data node. we have only one index with one data type as all items are same.. we have around 8 million records in that. we have 5 primary and 2 replica shards.

My query is:

  1. having 8 million in one index/type might cause this?Should I consider splitting it?
  2. we always hit master node to write and read, should I consider calling data node for reading?
  3. anything else I should consider of doing it different to have better performance?

Thanks much in advance.

1
could you please add your inputs so that the community can get the helpNag

1 Answers

1
votes
  1. 8 million documents in a single index is not that much, but that depends on the hardware spec of your machines (feel free to update your question with that)
  2. you should never hit the master node for searching your documents, but directly one of you data nodes. the master node is only there for managing your cluster but should never act as a client/coordinating node that handles your queries
  3. with only two data nodes, you don't need 2 replica shards, only one is sufficient