Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
INSTALL ELASTICSERCH IN SAME LIFERAY SERVER
Hello, can anyone helpme with install elasticsearch in the same server that liferay?If i installa in new server liferay works well, but in the same server dont.Thakns
Antonio Caballero:
Steps to reproduce? Start with your exact version, give steps and observations.
If I install in a new server Liferay works well, but in the same server it doesn't
"It doesn't work" only triggers "works for me", which you probably don't want to hear.
You actually don't want to do this...
Elasticsearch is a big memory and cpu hog. It needs those resources to have fast indexing and searching.
When you try to host both Elasticsearch and your application server on the same node, they are going to compete for CPU, memory, disk access, etc.
For whatever you think you'll gain not maintaining separate servers, you will be sacrificing performance and capacity to get there.
Additionally, you will never only have a single Elasticsearch node, you always want 3 or more nodes in order to avoid split brain.
Standing up separate servers is definitely the way to go.
Elasticsearch is a big memory and cpu hog. It needs those resources to have fast indexing and searching.
When you try to host both Elasticsearch and your application server on the same node, they are going to compete for CPU, memory, disk access, etc.
For whatever you think you'll gain not maintaining separate servers, you will be sacrificing performance and capacity to get there.
Additionally, you will never only have a single Elasticsearch node, you always want 3 or more nodes in order to avoid split brain.
Standing up separate servers is definitely the way to go.
Ok, so if i use embebed elasticsearch ther is no problem for work, ¿is it write?
Thanks
Thanks
Absolutely there is a problem using embedded.
Embedded Elastic has the same concern. It needs memory and processor time to do its work. If you try to use embedded, you are sacrificing memory and cpu from your tomcat application server, again you will be negatively impacting your response times as well as your capacity.
If you check the startup logs, Liferay specifically reports that embedded Elastic should not be used in production.
Embedded Elastic has the same concern. It needs memory and processor time to do its work. If you try to use embedded, you are sacrificing memory and cpu from your tomcat application server, again you will be negatively impacting your response times as well as your capacity.
If you check the startup logs, Liferay specifically reports that embedded Elastic should not be used in production.
It is not recommended but you can put your elastic search in the same server. We have a server with 4 VCPU in production with one liferay 7.1 and one elastic search and it works perfectly 6 months later.
Our site has more than 4000 users but only few users each days and for a small website it is ok.
On a bigger website may be you must put your elastic search in an other server or in 3 servers with 3 nodes but it depends of how many users will connect to your website in the same times.
There's no right answer, all is possible, you have to make a performance test to know what you need for your website.
Our site has more than 4000 users but only few users each days and for a small website it is ok.
On a bigger website may be you must put your elastic search in an other server or in 3 servers with 3 nodes but it depends of how many users will connect to your website in the same times.
There's no right answer, all is possible, you have to make a performance test to know what you need for your website.
"Our site has more than 4000 users but only few users each days and for a small website it is ok."
Exactly why I don't make any such claim. Your site, based on the size metrics you lay out here, is pretty much a fringe case, a case that maybe represents 2% of Liferay deployments worldwide.
Just because it works for you in this particular case, it should never be a default recommendation.
I'd be curious what your load testing showed, if you attempted to get even half of your 4k users concurrently hitting the site what piece buckled first...
Exactly why I don't make any such claim. Your site, based on the size metrics you lay out here, is pretty much a fringe case, a case that maybe represents 2% of Liferay deployments worldwide.
Just because it works for you in this particular case, it should never be a default recommendation.
I'd be curious what your load testing showed, if you attempted to get even half of your 4k users concurrently hitting the site what piece buckled first...
It is what I have said... You must make a performance test before.
For our website, we know that it is ok if 100 peoples are connecting in the same times, after that, the website is slower and slower but never crash we test with 1000 in the same time (4000 in the same times it never happens with the previous website)
In 6 months, we never have any problem and if this occurs, we can reboot it or add more CPU.We have others 6.1, 6.2 or 7.0 websites with only 2 VCPU and one has 8 years.
You talk about 2%, I am not agree, more than 60% of worldwide cms are in Wordpress. For me Liferay is not only for big companies, we can make a simple website for a bakery, a restaurant or a small company with only 1 server.
If I use 2 severs for the liferay, 3 servers for the Elastic, 2 servers for the database and why not 2 servers for the reverse proxy... I must have 9 servers!!! (at least 18 VCPU)
Only few companies can have this! (not 98%) I talk about national or regional companies not worldwide.
If I want to sell Liferay to small local companies (in France or may be an other country), they want to spend for 1 or 2 servers (between 2 VCPU or 10 VCPU) but if I talk about 10 VCPU they will go away and will use Drupal or WordPress.
I do not say you are wrong but for me Elasticsearch is not were I will spend my money in a liferay installation.
For our website, we know that it is ok if 100 peoples are connecting in the same times, after that, the website is slower and slower but never crash we test with 1000 in the same time (4000 in the same times it never happens with the previous website)
In 6 months, we never have any problem and if this occurs, we can reboot it or add more CPU.We have others 6.1, 6.2 or 7.0 websites with only 2 VCPU and one has 8 years.
You talk about 2%, I am not agree, more than 60% of worldwide cms are in Wordpress. For me Liferay is not only for big companies, we can make a simple website for a bakery, a restaurant or a small company with only 1 server.
If I use 2 severs for the liferay, 3 servers for the Elastic, 2 servers for the database and why not 2 servers for the reverse proxy... I must have 9 servers!!! (at least 18 VCPU)
Only few companies can have this! (not 98%) I talk about national or regional companies not worldwide.
If I want to sell Liferay to small local companies (in France or may be an other country), they want to spend for 1 or 2 servers (between 2 VCPU or 10 VCPU) but if I talk about 10 VCPU they will go away and will use Drupal or WordPress.
I do not say you are wrong but for me Elasticsearch is not were I will spend my money in a liferay installation.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™