Liferay Clustering Concepts

Liferay Clustering Concepts tutorial will drive you on  clustering concepts. Applications are required to configure clustering  handle large amount of traffic when one of the servers goes down.

 

Liferay Clustering

Activities at Server Level:

1. Web Server:

  • Load Balancing
  • Sticky Session

2. App Server:

  • Session Replication
  • Cache Replication
  • Indexing Replication
  • Farm Deployment configuration Tomcat – FARM, JBOSS- BAMBOO Deployment

High Level Steps:

The above architecture  diagram shows two node Liferay cluster setup has the following high level steps:

  • Both Liferay servers are required to configure with Same Database. You can also configure Database Sharding  for better performance)
  • Liferay has two cache layers :
    • Persistence/Hibdernate Layer Cache :  This is used to caches the database queries and entities. Liferay uses Entity and Finder cache Impl to cache the entities and queries
    • Business Level or Service Layer cache : Its mainly used in portlet level with support for MultiVM and SingleVM cache. MultiVM Pool is used in distributed cluster and SingleVM pool is to reflect on single node only.
    • Configure cache Replication with below options:
      • Cluster Link
      • RMI Replication
      • JGroup Replication
    • EH Cache Replication Techniques:
      • Multicast is a broad casting communication mechanism in which information shared from one or more server nodes to other server nodes.
      •  Uni cast is point to point communication and has below protocol to distribute data over the cluster.
      • MPING (=Multicast PING) uses IP multicast to discover the initial membership and will be  used with all transports.
      • BPING: Broadcast PING , uses UDP broadcasts to discover initial membership. This protocol is useless in IPv6 environments, as IPv6 has no notion of broadcast addresses.
      • File Ping/S3 Ping / RackSpace Ping
      • JDBC Ping
      • TCP Ping:  TCPPING is used with TCP as transport, and uses a static list of cluster members’s addresses
      • You can find the mping.xml, tcp.xml, udp.xml  files in  jgroups.jar,which is available  in /tomcat/webapps/ROOT/WEB-INF/lib folder.
  • Lucene Index configuration or Solr Server configuration
  • Load balancing (Apache server or HA Proxy)
  • Session Replication –. It is better to avoid session replication Liferay uses custom session object that contains large amount of data, so for each request, Session Data will be validated and replication among all application servers. so it will create load on server again.
    • It is recommended that sticky session with session replication gives you better result.

      Clustering Tutorials:

Liferay Unicast Session replication

In AWS or cloud Environments, multicast clustering will not work and  we faced this issue while configuring  liferay clustering on Amazon EC2. Go through this tutorial for more info: READ MORE

Liferay Cluster with cluster link

In this tutorial  we will look into Liferay Cluster setup  on Liferay 6.2 EE version with cluster link.READ MORE

Liferay Cache Replication With JGroups

Liferay Cache Replication with JGroups tutorial will give you details on “How to setup cache replication with JGroups” READ MORE

Liferay Cluster cache replication with RMI

In this tutorial, we will configure Liferay clustering with  RMI replication technique. RMI is default EHCache replication implementation method and uses over  TCP protocol.  READ MORE

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *