Issue
We are creating an Active-Passive Liferay environment, where the Liferay data from the filesystem and database of the active servers are replicated to the passive nodes of an external data center.
We also want to replicate the Elasticsearch data to the passive nodes, is there any way to have all Elasticsearch data of the passive data center up to date?
Environment
- Any DXP installation using Elasticsearch 6 or 7
Resolution
In order to cover your use case, the best alternative would be to configure the cross-cluster replication (CCR) functionality at the Elasticsearch level. This functionality replicates Elasticsearch indexes that are in different clusters in different data centers.
You have more information about Cross-cluster replication on the following Elasticsearch documentation page:
- Elasticsearch 6: https://www.elastic.co/guide/en/elasticsearch/reference/6.7/xpack-ccr.html
- Elasticsearch 7: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/xpack-ccr.html
Installation instructions can be found on this page:
- Elasticsearch 6: https://www.elastic.co/guide/en/elasticsearch/reference/6.7/ccr-getting-started.html
-
Elasticsearch 7: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ccr-getting-started-tutorial.html
Note: This Elasticsearch functionality would require purchasing the x-pack module or the Liferay Enterprise Search add-on.
Configuration of the CCR module in Liferay as of DXP 7.1
For Enterprise Search customers, as of DXP 7.1, Liferay also offers a cross-cluster replication plugin, which, based on the CCR functionality provided by Elasticsearch, allows you to configure the functionality from the Liferay user interface.
For more information on the CCR module of Liferay DXP 7.1, you can read the following articles:
Additional Information
- Elasticsearch 6 documentation about CCR:
- Elasticsearch 7 documentation about CCR:
- Liferay documentation about the CCR module of Liferay DXP side: