Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch deployment in a 2 server load balanced node js application setting

I have the following production setup for my Node JS application: Application production architecture

I am now going to integrate Elasticsearch in this setup. My question is regarding the best practices for deploying Elasticsearch in a production environment. All my instances are virtual machines, and I understand that Elasticsearch uses a lot of memory.

Should I therefore set up Elasticsearch on its own server (server 3), set it up on both server 1 and server 2 as a cluster (much like the Mongo DB replica set) or install it as a separate instance on each server.

What would be the benefits of the chosen method?

Many thanks!

like image 872
Axelfran Avatar asked Aug 26 '14 09:08

Axelfran


1 Answers

Option 2.

Briefly.. I would definitely set this up on both servers - giving you two nodes. Given the options you have stated, this will provide the maximum distribution, load balancing, performance and fault tolerance.

Ensure that you manually configure your memory allocation carefully, assigning 50% of the total allocated to heap on each node, and leave the rest to Lucene for indexing.

like image 77
Gillespie Avatar answered Nov 20 '22 06:11

Gillespie