08 December, 2017

Liferay DXP clustering

Hello Friends,

I am sure you would be looking for simple steps for DXP clustering.

Note:Liferay 7 clustering you can visit https://community.liferay.com/news/new-clustering-code-for-liferay-portal-community/ 

Image result for server clustering liferay

Steps for Liferay DXP clustering :

Liferay Setup:

- Setup liferay DXP in 2 separate servers which can be accesses using separate IP
- Both servers should be accessible to each other
- Here we are not going to setup 2 DXP instances in single server as it's not good for architectural perspective for production. 
- Setup first instance and populate DB data with single instance
- when you setup another DXP instance then point the same DB which you used for first instance. We are not going to use separate read write DB server here and will use single DB for read and write for both the instances. For production setup, you can think to create separate DB server for read and write operation.

Liferay Configurations for clustering 

Portal-ext Configuration for Node-1 and Node-2



# For clustering settings

In above property file, IP address would be your server IP address and TCP.xml we will see below.

TCP.xml configuration Node-1 and Node-2

- You can get this file from Liferay foundation.lpkg file
- extract lpkg and extract com.liferay.portal.cluster.multiple-1.0.11.jar where you can see tcp.xml
- copy tcp.xml file in local and update as per below settings which are highlighted. Here we are using TCPPING. You can use JDPCPing and other methods which liferay supports.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">
    <TCP bind_port="7800"




 <TCPPING async_discovery="true"
    <MERGE3  min_interval="10000"
    <FD timeout="3000" max_tries="3" />
    <VERIFY_SUSPECT timeout="1500"  />
    <BARRIER />
    <pbcast.NAKACK2 use_mcast_xmit="false"
    <UNICAST3 />
    <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
    <pbcast.GMS print_local_addr="true" join_timeout="2000"
    <MFC max_credits="2M"
    <FRAG2 frag_size="60K"  />
    <!--RSVP resend_interval="2000" timeout="10000"/-->

- Put this tcp.xml file in classpath of server and restart both the servers (nodes).

Setup shared Elastic server

You can refer https://customer.liferay.com/documentation/7.0/deploy/-/official_documentation/deployment/configuring-elasticsearch-for-liferay-0 for setting up elastic search server and point this server to both nodes so that both nodes keep common index records.

How to verify

- Look server log for both nodes where you will be able to see logs which tells you that both nodes listening each other.
- You can also create web content/Document in one node and check in another node. it should reflect without re-indexing and removing database cache.

- Liferay DXP Clustering
- How to Install Liferay DXP in a Clustered Environment
- Managing Liferay DXP's Distributed Cache

Rate Me:

0 Discussion:

Post a Comment

Your Comments on this post

Google Pay Referral Code s34xJ – Earn 180 INR Per Referral

You can use  Google Pay Referral Code s34xJ  and sign up on  Google pay  . Google has increased its referral commission from 51 to 180 INR. ...