RE: Embedded ElasticSearch modes

Jan Tošovský, modified 5 Years ago. Liferay Master Posts: 576 Join Date: 7/22/10 Recent Posts
What was the main motivation to change the Embedded ElasticSearch from running it on same JVM to running it on a separate JVM (sidecar)?
In former case tomcat and ES compete within Xmx limit. In latter case you have to make a hard split and divide memory to two limits. If one JVM doesn't utilize all available memory, it cannot be reused by another JVM so you effectively wasting your resources. If the Xmx is increased, there is risk the sum will exceed the available RAM (JVM can't detect this = crash). 
While Embedded approach is discouraged, it simplifies configuration, yet without significant performance hit for some projects.
If someone prefer Sidecar, why not, but the old method should be kept as well.
thumbnail
Jorge Diaz, modified 5 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Hi Jan Tošovský,
First of all, I have to do the usual warn: You should never use Embedded Elasticsearch in production environment.
About the change in 7.3 of running Elasticsearch in a different JVM, as far as I know, the change was necessary due to the move from Transport (9300 port) to the REST protocol (9200 port)
Elasticsearch has deprecated Transport connection, so sooner or later, Liferay had to move to the REST protocol.
One of the drawbacks of the new REST client was that executing a embedded Elasticsearch node wasn't possible using the new client code.
Regards,
Jorge