Databases Reference
In-Depth Information
Cache replication : Liferay Portal, by default, uses the Ehcache caching
framework for caching persistence and service layer resources. It is very
important to invalidate or replicate caches across the cluster to avoid stale
cache issues.
Media Library : Media Library is one of the key features of Liferay. It is used
to store documents, videos, images, and so on. Liferay stores the metadata of
the Media Library content in the Liferay database, but the actual resources
are stored using various repository stores. So, we need to ensure that the
Media Library content is stored at a centralized place.
Search indexes : Liferay provides a powerful built-in search feature.
The default installation uses the Lucene search engine to provide search
capability. The Lucene search engine stores the index on the filesystem.
It is very important to ensure that search indexes are either centralized or
replicated across all the nodes.
Quartz jobs : There are various features in Liferay which internally use
scheduled jobs. In a clustered environment, it is very important to ensure
that all the nodes are aware about running scheduler jobs.
In this section, we will learn how to configure these resources to work in a clustered
environment. We will also learn about the best practices associated with each option.
Session replication configuration
Session replication is a technique to replicate the session information across all the
nodes. With the help of session replication, we can ensure automatic recovery after
the failover of any node. In our load balancer configuration, we configured session
stickiness which ensures all requests related to the same user session are served
through a specific node. Now suppose that node goes down; in this case, the load
balancer sends subsequent requests to another node in the cluster. If the new node
does not have the session information of the same user, it considers it as a new
session and in this situation the user will be logged out of the system. With the help
of session replication, we can avoid this situation and ensure transparent switching
between nodes.
Let's learn how to configure session replication.
1.
Stop the Liferay Portal nodes if they are running.
2.
Edit the server.xml file of liferay-node-01 located in node-01\liferay-
portal-6.1.1-ce-ga2\ tomcat-7.0.27\conf , and add the following
configuration inside the <Engine> tag:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
 
Search WWH ::




Custom Search