Liferay Clustering

    Step 1: Webserver  configuration.
    Before configuring Liferay server for clustering some configuration need to be done at
    apache server level. These include installing and configuring ModJk which is a  connector
    for connecting tomcat container with webserver. Also configure the portal to use a sticky
    session and load balacer related configuration need to be done. You can refer this link 
    more info for detailed information about this configuration.
    Step 2:- Liferay  Configuration
    In  portal-ext.properties put the following properties
        cluster.link.enabled=true
        cluster.link.autodetect.address=<some-address>:<some-port>
        lucene.replicate.write=true
        ehcache.multi.vm.config.location=/mycache/liferay-multi-vm.xml
        net.sf.ehcache.configurationResourceName=/mycache/hibernate-clustered.xml
 
        multicast.group.address["hibernate"]=224.0.0.1
        multicast.group.port["hibernate"]=4446

        multicast.group.address["multi-vm"]=224.0.0.1
        multicast.group.port["multi-vm"]=4447
        


          The first will enable Liferay to replicate both database caches (ehcache) and search
          indexes (lucene) through a multicast communication.
          The second will tell Liferay what network interface to use for the multicast communication. 

          Install ehcache-plugin-portlet from plugins-installation and upload war file
          
          Put your multicast address in the portal-ext.properties file.

          Copy files hibernate-clustered-linked.xml and liferay-multi-vm-clustered.xml in    
          ROOT.war/WEB-INF/classes/mycache

         In ROOT.war/WEB-INF/web.xml add entry <distributable> before </webapp> tag.


         Configure jvmRoute="node1/node2" as defined in workers.properties in server.xml(in        
         deploy/jboss-web.sar for jboss)

      Document Library and Image gallery related configuration :
    put the following entries in the portal-ext.properties file to store the document library and
    image gallery related files in a common location accessible by both node instead of the 
    default location under Liferay server/data folder.
    dl.hook.file.system.root.dir=/mystoragepath/document_library
    image.hook.file.system.root.dir=/mystorageapth/images
    Now your liferay cluster is ready for use.



.

Comments

Popular posts from this blog

React development in Liferay - Overview

Liferay React with Webpack

Deploy Liferay DXP on google cloud