RE: Do i need a separate elastic search JVM?

John Joseph, modified 6 Years ago. New Member Posts: 5 Join Date: 12/2/15 Recent Posts
Hi All,

Liferay recommends the use of a seperate elastic search JVM in production for Liferay DXP. I dont have any search functionality in Liferay.  All i do is reindex users once in a while. Do i still need a seperate instance? I asked the same question to liferay support. They gave me a diplomatic answer. I am trying to see if anyone has gone through a  similar situation.

John
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
Well, you probably will receive only diplomatic answers here too.

It will work with the builtin ES instance.
But search is used widely, not only in backend. Do you use Asset Publisher? Well, it uses search internally. ES is used by several components internally.

Personally, I would use the builtin ES instance only in development environments, but in the end, it's your choice.
John Joseph, modified 6 Years ago. New Member Posts: 5 Join Date: 12/2/15 Recent Posts
Christoph Rabel
But search is used widely, not only in backend. Do you use Asset Publisher? Well, it uses search internally. ES is used by several components internally.


I dont use Asset Publisher either. Lets say if i go with Elastic Search in a different JVM, do i need a cluster or a will i be ok with a single node?
thumbnail
Jorge Díaz, modified 6 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
Hi John Joseph,

Embedded Elasticsearch is not supported in production environments, see following page: https://dev.liferay.com/discover/deployment/-/knowledge_base/7-1/configuring-elasticsearch-for-liferay-0#embedded-vs-remote-operation-mode

Embedded vs. Remote Operation Mode

When you start Liferay Portal, this message is displayed in the log:

2018-12-10 16:20:32.987 WARN [Elasticsearch initialization thread][EmbeddedElasticsearchConnection:288] Liferay is configured to use embedded Elasticsearch as its search engine. Do NOT use embedded Elasticsearch in production. Embedded Elasticsearch is useful for development and demonstration purposes. Refer to the documentation for details on the limitations of embedded Elasticsearch. Remote Elasticsearch connections can be configured in the Control Panel.
When you install Liferay Portal, Elasticsearch is already embedded. In embedded mode, Elasticsearch search runs in the same JVM to make it easy to test-drive with minimal configuration. Running both servers in the same process has drawbacks:
  • Elasticsearch must use the same JVM options as Liferay Portal.
  • Liferay Portal and Elasticsearch compete for resources.
As you say you have access to Liferay Support, If you finally use Embedded Elasticsearch in production and you have any problem there, Liferay support service won't be able to help you.

You will also have problems in case you are using a Liferay cluster, as each node will have its own Embedded Elasticsearch and their data won't be sync, so searchs won't work properly.
John Joseph, modified 6 Years ago. New Member Posts: 5 Join Date: 12/2/15 Recent Posts
As you say you have access to Liferay Support, If you finally use Embedded Elasticsearch in production and you have any problem there, Liferay support service won't be able to help you. 
This is one of my concern too
thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Okay, everyone is quoting doco and stuff but not really answering the question, IMHO.

You must offload Elastic because it is a huge memory and CPU hog.

You might think you are not using search, but Liferay uses it for everything.

When you start Liferay w/ the embedded Elastic, it takes some of the memory for its own purposes, limiting the resources available to Liferay and serving traffic. It will apply a hit to response time because it is servicing the internal requests, etc.

​​​​​​​So yes, you absolutely need to offload Elastic to a separate JVM whether you think you are using search or not.
thumbnail
Andrew Jardine, modified 6 Years ago. Liferay Legend Posts: 2416 Join Date: 12/22/10 Recent Posts
.. and I'm sure David would also agree that YES you want to have an Elastic Cluster. I would even advocate for a minimum of 3 nodes. Search is so easy to use in Liferay and an excellent way to offload read operations from your database to "shared the load" across all your resources.