All about Liferay 7 CE clustering
All about Liferay 7 CE clustering

Lets talk today about Liferay 7 CE clustering. And we will discuss about most interesting and most complex part - cache and scheduler jobs clustering. Other clustering aspects stay same as before (like common database or common document library repository), or quite easy to configure (like using remote ElasticSearch).

So, as we remember, at some moment Liferay dropped support for clustering in Liferay 7 CE. Their position were quite clear - if you need clustering - please use Liferay DXP (that is reasonable). After some releases Liferay changed opinion and said, ok - we will return clustering into Liferay CE, and finally, in Liferay 7.0.4 GA5 returned it. If you will google for "Liferay Clustering" and will find official documentation (hopefully Liferay has now excellent documentation) and it said

"Note: Clustering is available in Liferay Portal CE 7.0 GA5+."

Great! So, finally I found time to check it and I can say - it is not so great.

If you will download Liferay CE7.0.4 GA5 and follow to instructions in official documentation: configure common database, common document library repository, common ElasticSearch, enable clustering (actually it is just 1 line in portal-ext.properties enabled cluster link) everything will work. And everything is really work except one point - cache is not synchronized between node...

Wny?

After some time of investigation i found one "clear" thing:

"Available" does not mean "included"

That means clusterization is available starting from GA5, but it is not included into distributive. If you need to have Liferay CE with clustering support you should go to this article (interesting thing - there are no reference to this page from official documentation). After it you will need:

  • Get Liferay sources from GitHub
  • Build it
  • Build additional modules
  • Remove all modules without clustering support
  • Place into distribution modules with clustering support

And - finally you have Liferay 7 CE with clustering. I've checked - it works (of course with some tricks and workarounds) - and after few hours I finally received my caches to be synchronized between nodes!

In general, I can understand Liferay - they promise to community to return clustering into CE version - and they did it - they returned it, but only for community. For people with head, hands and Liferay experience. All end customers still should use Liferay DXP in case they need clusterization "out of box"

Clustering: RMI vs JGroups

OK, you you have head and heands, and already configured clustering for you Liferay 7 CE, probably you will be interested in followed post. Actually - there are another branch - provided more optimal clustering solution, based not on RMI, but no JGroups.

I did not tested it yet, will try later - but this solution also looks interesting.

 

13.12.2017