This document discusses advanced Liferay architecture including clustering and high availability configurations. It provides sample setups using Apache load balancers with Tomcat and Liferay. It also outlines the key components that need to be addressed for a clustered Liferay implementation including the load balancer, centralized database, Ehcache, Lucene, document library, and more. The document then provides steps to test if clustering is working properly and discusses approaches to performance tuning Liferay including using a repeatable test script, load testing, and Java profiling.
Splunk for JMX App overview (configuration, deployment, tips and tricks). Developing JMX logic in your application. Splunking other JVM logs and profiling traces. The JVM application landscape and why it's such a rich source of Splunkable machine data. Developing new Splunkbase apps to leverage Splunk for JMX.
Splunk for JMX App overview (configuration, deployment, tips and tricks). Developing JMX logic in your application. Splunking other JVM logs and profiling traces. The JVM application landscape and why it's such a rich source of Splunkable machine data. Developing new Splunkbase apps to leverage Splunk for JMX.
The RED Method: How to monitoring your microservices.Grafana Labs
The RED Method defines three key metrics you should measure for every microservice in your architecture; inspired by the USE Method from Brendan Gregg, it gives developers a template for instrumenting their services and building dashboards in a consistent, repeatable fashion.
In this talk we will discuss patterns of application instrumentation, where and when they are applicable, and how they can be implemented with Prometheus. We’ll cover Google’s Four Golden Signals, the RED Method, the USE Method, and Dye Testing. We’ll also discuss why consistency is an important approach for reducing cognitive load. Finally we’ll talk about the limitations of these approaches and what can be done to overcome them.
Power of Microservices Architecture in Drupal DevelopmentOpenSense Labs
A microservice architecture is where the application (monolithic) is broken into sub-services loosely coupled together. Here's how you can leverage the power of microservices in your Drupal architecture
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항Ji-Woong Choi
Cloud 기반으로 U2C(Unix to Cloud),U2L(Unix to Linux) 마이그레이션에 대한 가이드 라인과 사이징 관련 고려 사항에 대해 설명한 자료입니다.
많은 전환 프로젝트에서 추출된 경험치가 들어가 있으며, 전환별 난이도 및 고려사항이 들어가 있습니다.
Introduction to Ironic, OpenStack Bare Metal and a highlight of features such as multi-tenancy, auto-discovery, Redfish and network information extraction with LLDP
Synthetic Monitoring Deep Dive - AppSphere16AppDynamics
Learn how to monitor end-to-end workflows from every corner of the world. Hear the basics of AppDynamics Synthetic Monitoring and its integration in the AppDynamics Unified Monitoring Platform. Dive into scripting and how it allows monitoring of complex end-to-end workflows via a set of real-world examples describing best practices and tips to write better scripts and avoid common pitfalls.
Key takeaways:
o What AppDynamics Synthetic Monitoring can do today, and where the technology is going
o See how Synthetic Monitoring complements Real User Monitoring and APM
o Overview of the best tools available to help you build scripts quickly and reliably
o Tips for handling complex websites, avoiding common pitfalls, and leveraging synthetic monitoring to run WebDriver scripts
For more information, go to: www.appdynamics.com
Introduction to Elastic Compute Service on Alibaba Cloud to Power Your Busine...Alibaba Cloud
See webinar recording of this presentation at https://resource.alibabacloud.com/webinar/detail.htm?webinarId=32
Need a better way of looking at your business data? Learn how to take your raw data and achieve powerful data visualization in just minutes. Join this webinar to get up and running with Alibaba Cloud QuickBI and gain an intuitive understanding of several commonly used data visualization charts and their application to business. No programming experience required.
From this webinar, you will gain an informed understanding of:
1. The importance and why we need to visualize data
2. How to utilize QuickBI to achieve data visualization in just minutes
3. How to upload data and generate different charts through a live demonstration of QuickBI.
Alibaba Cloud Elastic Compute Service provides worldwide Infrastructure-as-a-Service (IaaS) to support millions of businesses around the world. This webinar provide a clear introduction to the Alibaba Cloud ECS, which will help you to gain a better understanding of the ECS product portfolio and the benefits of using this product to power your own web applications from 18 global deployment regions.
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
OpenStack Ceph & Neutron에 대한 설명을 담고 있습니다.
1. OpenStack
2. How to create instance
3. Ceph
- Ceph
- OpenStack with Ceph
4. Neutron
- Neutron
- How neutron works
5. OpenStack HA- controller- l3 agent
6. OpenStack multi-region
AWS를 사용하는 게임 고객사를 대상으로 ‘Amazon GameLift 세션’ 을 준비했습니다.
GameLift는 클라우드에서 세션 기반 멀티플레이 게임 서버를 배포, 운영, 조정하는 데 사용되는 완전 관리형 서비스로, 본 행사에서는 Amazon GameLift를 이용한 세션형 1:1 게임 배포 실습을 진행합니다.
The RED Method: How to monitoring your microservices.Grafana Labs
The RED Method defines three key metrics you should measure for every microservice in your architecture; inspired by the USE Method from Brendan Gregg, it gives developers a template for instrumenting their services and building dashboards in a consistent, repeatable fashion.
In this talk we will discuss patterns of application instrumentation, where and when they are applicable, and how they can be implemented with Prometheus. We’ll cover Google’s Four Golden Signals, the RED Method, the USE Method, and Dye Testing. We’ll also discuss why consistency is an important approach for reducing cognitive load. Finally we’ll talk about the limitations of these approaches and what can be done to overcome them.
Power of Microservices Architecture in Drupal DevelopmentOpenSense Labs
A microservice architecture is where the application (monolithic) is broken into sub-services loosely coupled together. Here's how you can leverage the power of microservices in your Drupal architecture
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항Ji-Woong Choi
Cloud 기반으로 U2C(Unix to Cloud),U2L(Unix to Linux) 마이그레이션에 대한 가이드 라인과 사이징 관련 고려 사항에 대해 설명한 자료입니다.
많은 전환 프로젝트에서 추출된 경험치가 들어가 있으며, 전환별 난이도 및 고려사항이 들어가 있습니다.
Introduction to Ironic, OpenStack Bare Metal and a highlight of features such as multi-tenancy, auto-discovery, Redfish and network information extraction with LLDP
Synthetic Monitoring Deep Dive - AppSphere16AppDynamics
Learn how to monitor end-to-end workflows from every corner of the world. Hear the basics of AppDynamics Synthetic Monitoring and its integration in the AppDynamics Unified Monitoring Platform. Dive into scripting and how it allows monitoring of complex end-to-end workflows via a set of real-world examples describing best practices and tips to write better scripts and avoid common pitfalls.
Key takeaways:
o What AppDynamics Synthetic Monitoring can do today, and where the technology is going
o See how Synthetic Monitoring complements Real User Monitoring and APM
o Overview of the best tools available to help you build scripts quickly and reliably
o Tips for handling complex websites, avoiding common pitfalls, and leveraging synthetic monitoring to run WebDriver scripts
For more information, go to: www.appdynamics.com
Introduction to Elastic Compute Service on Alibaba Cloud to Power Your Busine...Alibaba Cloud
See webinar recording of this presentation at https://resource.alibabacloud.com/webinar/detail.htm?webinarId=32
Need a better way of looking at your business data? Learn how to take your raw data and achieve powerful data visualization in just minutes. Join this webinar to get up and running with Alibaba Cloud QuickBI and gain an intuitive understanding of several commonly used data visualization charts and their application to business. No programming experience required.
From this webinar, you will gain an informed understanding of:
1. The importance and why we need to visualize data
2. How to utilize QuickBI to achieve data visualization in just minutes
3. How to upload data and generate different charts through a live demonstration of QuickBI.
Alibaba Cloud Elastic Compute Service provides worldwide Infrastructure-as-a-Service (IaaS) to support millions of businesses around the world. This webinar provide a clear introduction to the Alibaba Cloud ECS, which will help you to gain a better understanding of the ECS product portfolio and the benefits of using this product to power your own web applications from 18 global deployment regions.
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
OpenStack Ceph & Neutron에 대한 설명을 담고 있습니다.
1. OpenStack
2. How to create instance
3. Ceph
- Ceph
- OpenStack with Ceph
4. Neutron
- Neutron
- How neutron works
5. OpenStack HA- controller- l3 agent
6. OpenStack multi-region
AWS를 사용하는 게임 고객사를 대상으로 ‘Amazon GameLift 세션’ 을 준비했습니다.
GameLift는 클라우드에서 세션 기반 멀티플레이 게임 서버를 배포, 운영, 조정하는 데 사용되는 완전 관리형 서비스로, 본 행사에서는 Amazon GameLift를 이용한 세션형 1:1 게임 배포 실습을 진행합니다.
Con queste “14 misere” slide ho cercato d’introdurre Liferay e come iniziare con il piede giusto per affrontare lo sviluppo di applicazioni ai voi che siete proprio “novelli”. Spero di essere riuscito con questo primo episodio a suscitare la vostra curiosità e interesse.
An interactive Liferay (DXP) 7 Tech Meet up was codified by Azilen Technologies on 18th March, 2017 at Ahmedabad Management Association.
Those who have missed the direct confrontation can explore few of the knowledge elements here in the Presentation.
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
Galera Cluster for MySQL, Percona XtraDB Cluster and MariaDB Cluster (the three “flavours” of Galera Cluster) make use of the Galera WSREP libraries to handle synchronous replication.MySQL Cluster is the official clustering solution from Oracle, while Galera Cluster for MySQL is slowly but surely establishing itself as the de-facto clustering solution in the wider MySQL eco-system.
In this webinar, we will look at all these alternatives and present an unbiased view on their strengths/weaknesses and the use cases that fit each alternative.
This webinar will cover the following:
MySQL Cluster architecture: strengths and limitations
Galera Architecture: strengths and limitations
Deployment scenarios
Data migration
Read and write workloads (Optimistic/pessimistic locking)
WAN/Geographical replication
Schema changes
Management and monitoring
Optimizing your java applications for multi core hardwareIndicThreads
Session Presented at 5th IndicThreads.com Conference On Java held on 10-11 December 2010 in Pune, India
WEB: http://J10.IndicThreads.com
------------
Rising power dissipation in microprocessor chips is leading to a trend towards increasing the number of cores on a chip (multi-core processors) rather than increasing clock frequency as the primary basis for increasing system performance. Consequently the number of threads in commodity hardware has also exploded. This leads to complexity in designing and configuring high performance Java applications that make effective use of new hardware. In this talk we provide a summary of the changes happening in the multi-core world and subsequently discuss about some of the JVM features which exploit the multi-core capabilities of the underlying hardware. We also explain techniques to analyze and optimize your application for highly concurrent systems. Key topics include an overview of Java Virtual Machine features & configuration, ways to correctly leverage java.util.concurrent package to achieve enhanced parallelism for applications in a multi-core environment, operating system issues, virtualization, Java code optimizations and useful profiling tools and techniques.
Takeaways for the Audience
Attendees will leave with a better understanding of the new multi-core world, understanding of Java Virtual Machine features which exploit mulit-core and the techniques they can apply to ensure their Java applications run well in mulit-core environment.
A hibernate tutorial for beginners. It describe the hibernate concepts in a lucid manner and and test project(User application with database) to get hands on over the same.
Abstract
Concurrency is everywhere. Prior to Java 5, concurrency was difficult
and error prone. Since Java 5, it's far more prevalent in our
application code, and through time it's been lurking in open-source
frameworks and containers. Concurrency is also a fundamental part of
Shopzilla's web-site and services ecosystem.
Introduction
Rod Barlow from Shopzilla will explore a brief history of concurrency, and the key
concurrency features and techniques provided by the Java API since
Java 5. Topics covered include Immutability, Atomic References, Blocking
Queues, Locks and Deadlocks. Also covered is Concurrency in
Frameworks, and Shopzilla's Website Concurrency Framework, including
Thread Pools, Executors and Futures.
Similar to Advanced liferay architecture clustering and high availability (20)
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Building RAG with self-deployed Milvus vector database and Snowpark Container...Zilliz
This talk will give hands-on advice on building RAG applications with an open-source Milvus database deployed as a docker container. We will also introduce the integration of Milvus with Snowpark Container Services.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Essentials of Automations: The Art of Triggers and Actions in FME
Advanced liferay architecture clustering and high availability
1.
Advanced Liferay Architecture: Clustering and High Availability
Revision
1.1,
Oct
2010
rd
*Note: All of the configuration examples in 3 -party software (i.e. – Apache, Sun Java) in this document are examples only. Please read the
appropriate documentation and apply the settings that are appropriate for your system. Liferay does not recommend these exact same settings
for all systems.
1
2.
Contents
Overview ...................................................................................................................................... 3
Is Clustering Enough?.................................................................................................................. 4
Sample Setups............................................................................................................................. 5
Apache + mod_jk + Tomcat + Liferay:...................................................................................... 5
Apache + mod_proxy + Tomcat + Liferay: ............................................................................... 6
Apache + mod_proxy_balancer + Tomcat + Liferay:................................................................ 7
What Is My Liferay Cluster Checklist? ......................................................................................... 8
Sample Checklist (Logical View): ............................................................................................. 8
Sample Checklist (Detailed File View): .................................................................................... 9
A Quick Test To Check If Liferay Clustering Is Working ............................................................ 10
Performance Tuning Approach .................................................................................................. 10
General Steps: ....................................................................................................................... 10
What Do I Tune? .................................................................................................................... 12
Application Server Tuning ...................................................................................................... 12
Deactivate Development Settings in the JSP Engine.......................................................... 12
Thread Pool ........................................................................................................................ 13
Database Connection Pool ................................................................................................. 14
Java Virtual Machine (JVM) Tuning ....................................................................................... 14
Garbage Collector............................................................................................................... 15
Java Heap........................................................................................................................... 15
Monitoring GC and JVM ..................................................................................................... 15
So What Are Some Example Settings?.................................................................................. 17
Moving Forward ......................................................................................................................... 20
Liferay Training....................................................................................................................... 20
Liferay Enterprise Edition Support.......................................................................................... 20
Liferay Professional Services ................................................................................................. 20
2
3.
Overview
Once a standard Liferay installation has been completed, you may find that there is a need for a more advanced setup. You may need to
prepare to handle more requests and arrange for more guaranteed uptime. This paper provides valuable insight and recommendations
for configuring Liferay Portal to work in high availability (HA) use case scenarios.
3
4.
Is Clustering Enough?
HA is more than just server clustering, though that is part of the equation. It is a configuration that: 1) is able to handle the expected
number of concurrent users and subsequent traffic, and 2) reduces single points of failure for a robust system uptime.
It is important to remember that Liferay Portal, at the end of the day, is a Java web application, and that many of the principles that apply
to clustering any other Java web application running on your Java application server or Java servlet container apply here. We will be
using familiar techniques such as load balancing and clustering at the server level, as well as Liferay-specific configuration settings for
application-level HA.
It is important for us to define what "load balancing" is. Load balancing is simply a technique to distribute workload across resources. It is
but one component in a high-availability cluster. In Liferay Portal’s case, we are load balancing the volume of requests across multiple
app servers, which may or may not be on physically separate hardware. Initially, this may seem sufficient, until you realize some of the
components that the portal uses.
Here is a high-level picture of this type of set-up:
4
5.
Sample Setups
The following are some sample configurations that you may want to consider. You may or may not have these exact
configurations, or a derivative or permutation of one of them.
APACHE + MOD_JK + TOMCAT + LIFERAY:
5
8.
What Is My Liferay Cluster Checklist?
SAMPLE CHECKLIST (LOGICAL VIEW):
Liferay clustering is not just pointing a load balancer to two (or more) Liferay nodes. You are not done. Why? Because there are certain
application-level components that need to be either centrally managed or synchronized. Here is the basic checklist of components that
need to be addressed in a Liferay cluster:
1. Load Balancer - This can be software (e.g., Apache), or hardware (e.g., F5), or whatever you wish, really--all it is doing is
redirecting requests.
2. Centralized Database – The connection to the database is simply a JBDC connection. For the application server (or servlet
container) it is a JNDI resource. Whether there exists a clustered database or not is abstracted from Liferay's point of view.
Any level of redundancy you have behind that JDBC connection is up to you and your DBA. Just as an example, you may
choose to configure a MySQL cluster, or Oracle RAC, for DB high availability. Also, we suggest that you move away from
HSQL and use a more robust database server. HSQL is for demo purposes only.
3. Ehcache - This is what Liferay uses out-of-the-box for its Hibernate level 2 cache. This needs to be configured to sync or else
you will see inconsistencies, depending on what node the load balancer redirects your end users to. You are not forced to use
Ehcache; it is simply what Liferay ships with. You could use something like Terracotta, for example. If you do not do this, you
will most definitely see inconsistencies depending on the node the end user is on, due to stale caches. For more information
on how to get started with Liferay and Terracotta, please see: http://www.liferay.com/web/mika.koivisto/blog/-/blogs/how-do-i-
cluster-liferay-with-terracotta.
4. Lucene - This needs to be centralized. This can be done a) via JDBC (can work, but there may be issues with speed and
table locks); b) swapped out for something like SOLR (runs as a webapp in Tomcat); or c) a clusterlink feature (first made
available with Liferay 5.2 SP2) that can be turned on where each node maintains its own replicated cache. If you do not do
this, you will see inconsistencies with search and other indexed data that is returned from the DB.
5. Document Library & Image Gallery - This needs to be centralized. This is because each node keeps the assets locally on
the file system by default. While the meta-data is in the DB, the files serve up faster this way (as opposed to BLOBS in a DB).
So, you need to either a) point the content repository to be stored in the DB (can work but performance may suffer) via
JCRHook in portal properties, or b) mount a path a shared storage (i.e. SAN or other file system storage) and configure each
node to connect to this common place via AdvancedFileSystemHook in portal properties. If you do not do this, the meta-data
regarding your documents will be in the DB, but when you try to retrieve them, the node may or may not find the document
there, physically.
8
9.
SAMPLE CHECKLIST (DETAILED FILE VIEW):
This is merely a sample of a list of files that may or may not need to be edited, or at least checked, for a proper Liferay HA cluster
configuration. For other operating systems and application servers, please use the appropriate files on that system.
Node Applications Operating System Locations Checklist
Web Server 1 Apache 2.2.9 Debian 5.0 32bit 192.168.1.100 1 /etc/apache2/sites-available/default √
+mod_jk1.2.26 2 /etc/apache2/mods-enabled/jk.load √
3 /etc/apache2/ports.conf √
4 /etc/apache2/workers.properties √
5 /etc/hosts √
6 cat /proc/net/dev_mcast √
ifconfig -a | grep -i multicast
Liferay Portal 1 Liferay 6.0 GA Debian 5.0 32bit 192.168.1.101 1 cat /etc/hosts √
+Tomcat 6.0.26 2 cat /etc/profile √
3 echo $JAVA_HOME √
4 echo $PATH √
5 $TOMCAT_HOME/lib/portal-ext.properties √
6 $TOMCAT_HOME/conf/server.xml √
7 $TOMCAT_HOME/webapps/ROOT/WEB-INF/web.xml √
8 $TOMCAT_HOME/../data/jackrabbit/repository.xml √
9 $TOMCAT_HOME/webapps/ROOT/WEB- √
INF/classes/ehcache/hibernateclustered.
xml
10 $TOMCAT_HOME/webapps/ROOT/WEB- √
INF/classes/ehcache/liferay-multivm-
clustered.xml
11 cat /proc/net/dev_mcast √
ifconfig -a | grep -i multicast
2 Liferay 6.0 GA Debian 5.0 32bit 192.168.1.102 1 cat /etc/hosts √
+Tomcat 6.0.26 2 cat /etc/profile √
3 echo $JAVA_HOME √
4 echo $PATH √
5 $TOMCAT_HOME/lib/portal-ext.properties √
6 $TOMCAT_HOME/conf/server.xml √
7 $TOMCAT_HOME/webapps/ROOT/WEB-INF/web.xml √
8 $TOMCAT_HOME/../data/jackrabbit/repository.xml √
9 $TOMCAT_HOME/webapps/ROOT/WEB- √
INF/classes/ehcache/hibernateclustered.
xml
10 $TOMCAT_HOME/webapps/ROOT/WEB- √
INF/classes/ehcache/liferay-multivm-
clustered.xml
11 cat /proc/net/dev_mcast √
ifconfig -a | grep -i multicast
Database 1 MySQL 5.0.51 Debian 5.0 32bit 192.168.1.103 1 /etc/mysql/my.cnf √
9
10.
A Quick Test To Check If Liferay Clustering Is Working
1. Bring up the load balancer
2. Bring up Node 1
3. Bring up Node 2
4. Open Browser 1 and go to Node 1 directly (i.e. – http://192.168.1.101:8080)
5. On Browser 1 go to page 1 (i.e. - http://192.168.1.101:8080/web/guest/home) logged in as Admin
6. Open Browser 2 (different browser session) and go to Node 2 directly (i.e. – http://192.168.1.102:8080)
7. On Browser 2 go to page 1 (i.e. - http://192.168.1.102:8080/web/guest/home) logged in as Admin
8. In Browser 1 add a portlet to the page
9. Shut down Node 1
10. Go to Browser 2 and refresh the page (i.e. – CTRL F5)
If Browser 2 refreshes and shows the added portlet from Browser 1, Liferay clustering in most likely configured correctly. This is
because this behavior demonstrates that Node 2 is properly replicating cache. You can try reversing the order of Node 1 and
Node 2 in the above test to be extra sure.
Performance Tuning Approach
For every performance tuning job, and there are some guiding principles that apply in every environment. A good place to start is
to have a set of portal properties, xml configurations, and JVM flags that you know that you will use and apply every time. But that
can only go so far, because every app is different and has different needs.
Performance tuning is a very iterative process. It involves 3 main components:
o A repeatable test script
o A load test client
o A Java profiler
GENERAL STEPS:
1. Decide on what you want - The first thing you need to do is to decide what you want to do for your test. Do you simply
want to hit localhost, sign in, and sign out? Or do you want to browse around many pages with certain portlets placed on
each page before signing out? Find out what the customer wants and decide on a test, or a number of test cases, early
on and stay consistent throughout the performance tuning process. This will ensure meaningful results.
2. Create a script - The next thing you need to do is create the script for the repeatable test. For example, in Apache
JMeter, it is easy to use the built-in proxy server to record a test script, based on your click actions. You can save this
and run it multiple times across multiple threads.
3. Decide on your numbers - Decide how many concurrent users and repetitions you want to run this test as. For
example, if the customer wants to test 200 concurrent users, you would configure JMeter to run 200 threads. You could
maybe ramp them up 3 seconds apart, so in JMeter, you would configure the 200 threads to run within 600 seconds (i.e.
- every 3 seconds, a thread will be started, each thread executing the test script).
4. Establish a baseline - This is a very important step, as this will prove that there was measurable improvement backed
10
11. up by statistics. In JMeter, you can use the aggregate report to gather data for this baseline. You have to show that you
started somewhere.
5. Use a Java profiler - Why is this important? Because if you are stuck on why the CPU is spiking so much, why the
memory keeps growing, why certain threads seem to be blocked, and so on. Apart from some very clever debugging in
the code or a lucky guess, you will need a Java profiler to really nail down what the true cause is. This is because a
Java profiler can examine what is in the JVM. It can examine what objects are in memory, how much memory you have
available, how much memory is allocated, CPU performance and spiking, active threads, blocked or waiting threads,
and much more. Recommended profilers are JProfiler, YourKit Java Profiler, and Netbeans Profiler.
6. Identify bottlenecks - Once you have the profiler in place, it will be much easier to see the bottlenecks. Is it too little
heap? Is it processor power? Is there a memory leak? Are there blocked threads? Once you identify the bottlenecks,
you can address those bottlenecks via configuration or code changes. Then deploy your changes.
7. Repeat the above steps - You must use the same test and run it the same way, after you have addressed your
bottlenecks. You will most likely run into another, different bottleneck, but that is OK. The point is that you want to keep
addressing the bottlenecks as they show up, address them, repeat the process, until you get the desired performance
that you want. Take measurements and record statistics after every iteration! This will show progress.
If you do not use a Java profiler, it is almost always a wild guess as to what the problem is. Maybe an educated guess, but it's still
a guess. Yes there is some overhead when attaching the Java profiler to the app server, but most times, this is negligible in
testing scenarios. Again, this is very much an iterative process. Test, identify bottlenecks, address bottlenecks, rinse-repeat.
Usually for customers we estimate 5 days. It's not something that can be done with quality, overnight. The iterations,
configuration changes, code changes, redeployments, and testing all take time.
Lastly, do not run the tests in production! Make a copy and a test environment. The tests are supposed to be designed to slow
down the system to reveal and identify the bottlenecks.
11
12.
WHAT DO I TUNE?
When tuning your Liferay Portal, there are several factors to take into consideration, some specific to Liferay Portal, while
others are concepts that apply to all Java and Java enterprise applications.
DISCLAIMER:
The following setting application server and JVM recommendations are only samples. The exact numbers that may be
appropriate for your system may differ greatly from the samples presented here. Final configuration settings and numbers
depend on the number of users your site needs to service, the level of responsiveness and fault tolerance that is acceptable to
users, and the business requirements of your system. All of these factors can vary greatly from one Liferay deployment to
another.
APPLICATION SERVER TUNING
Although how to change the settings may differ, the following parameters are applicable across most application servers. You
should also consult your application server provider’s documentation for additional specific settings that they may advise.
Deactivate Development Settings in the JSP Engine
Most application servers have their JSP Engine configured for development mode. Liferay recommends deactivating many of
these settings prior to entering production:
• Development mode – this will enable the JSP container to poll the file system for changes to JSP files.
• Fork – fork the compilation of JSPs into a separate JVM. This is not required if development mode is off.
• Trim Spaces – removes excess whitespace between JSP Tag Library
• Mapped File – generates static content with one print statement versus one statement per line of JSP text.
• Generate String as Char Array – generates strings as static character arrays to relieve excess garbage collection.
Tomcat 5.5.x and 6.0.x
In the $CATALINA_HOME/conf/web.xml, update the JSP servlet to look like the following*:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>trimSpaces</param-name>
<param-value>true</param-value>
12
13. </init-param>
<init-param>
<param-name>mappedFile</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>genStrAsCharArray</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Thread Pool
Each incoming request to the application server consumes a thread for the duration of the request. When no threads are
available to process requests, a request will be queued waiting for the next available thread. In a finely tuned system, the
number of threads in the thread pool should be relatively limited. Configuring for too many threads will cause your machine to
perform poorly, spending significant time switching between active threads.
Liferay Engineering recommends setting this initially to 50 threads and then monitoring it within your application server’s
monitoring consoles.
Tomcat 5.5.x and 6.0.x
In Tomcat, the thread pools are configured in the Connector element in $CATALINA_HOME/conf/server.xml. Further information
can be found in the Apache Tomcat documentations (http://tomcat.apache.org/tomcat-6.0-doc/config/http.html). Liferay
Engineering has used the following configuration during testing*:
<Connector port="8019" maxHttpHeaderSize="8192"
maxThreads="50" minSpareThreads="50" maxSpareThreads="50"
enableLookups="false" acceptCount="100" redirectPort="8443"
protocol=”AJP/1.3”
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
13
14.
Database Connection Pool
Set to roughly 20-30% of the thread pool size. The connection pool provides a connection whenever Liferay Portal needs to
retrieve data from the database (e.g. user login, etc). If this size is too small, requests will queue in the server waiting for
database connections. However, too large a setting will mean wasting resources with idle database connections.
Tomcat 5.5.x and 6.0.x
In Tomcat, the connection pools are configured in the Resource elements in $CATALINA_HOME/conf/ Catalina/localhost/
ROOT.xml. Liferay Engineering used the following configuration during testing*:
<Resource
auth="Container"
description="Portal DB Connection"
driverClass="com.mysql.jdbc.Driver"
maxPoolSize="50"
minPoolSize="10"
acquireIncrement="5"
name="jdbc/LiferayPool"
user="XXXXXX"
password="XXXXXXXXX"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
jdbcUrl="jdbc:mysql://someServer:3306/lportal?useUnicode=true&characterEncoding=UTF-
8&useFastDateParsing=false"/>
In this configuration, we have a maximum of 50 connections in the pool and starting with 10. Should all 10 be used, the pool will
automatically add 5 additional connections.
JAVA VIRTUAL MACHINE (JVM) TUNING
Tuning the JVM primarily focuses on tuning the garbage collector and the Java memory heap. These parameters look to
optimize the throughput of your application. We used the Sun 1.6 JVM for the reference architecture. You may also choose the
IBM JVM and Oracle’s JRockit JVM.
14
15.
Garbage Collector
Choosing the appropriate garbage collector will help improve the responsiveness of your Liferay Portal. Liferay Engineering
recommends using the concurrent low pause collectors, similar to the settings as follows*:
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=8 -
XX:+CMSCompactWhenClearAllSoftRefs -XX:CMSInitiatingOccupancyFraction=85
Other garbage collectors include a concurrent throughput collector. You may find more information on garbage collector
heuristics at http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html.
Java Heap
When most people think about tuning the Java memory heap, they think of setting the maximum and minimum memory of the
heap. Unfortunately, you require far more sophisticated tuning for the heap to obtain optimal performance, including tuning
young generation size, tenuring durations, survivor spaces, and other JVM internals.
For the reference architecture, Liferay recommends adding something similar to the following to your VM parameters*:
-server -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx2048m -XX:MaxPermSize=128m -XX:SurvivorRatio=6 -
XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15
You may find the definitive list of Sun JVM options are located at: http://blogs.sun.com/watt/resource/jvm-options-list.html.
Monitoring GC and JVM
Although the parameters introduced here will give you a good start to tuning your JVM, you should still monitor it to ensure you
have the best settings to meet your needs. There are several tools to help you monitor Sun JVM performance including:
Visual VM (http://visualvm.dev.java.net)
This tool provides a centralized console for viewing Sun JVM performance information, including garbage collector activities.
15
16.
[Visual VM’s Visual GC]
JMX Console
This tool helps display various statistics like Liferay’s distributed cache performance, the performance of application server
threads, JDBC connection pool usage, and etc.
You may add the following to you application server’s JVM arguments to enable JMX connections*:
-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=5000 -
Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
16
17. [Visual VM's JMX Console]
Garbage collector logs
You may add something similar to the following to your JVM arguments*:
-Xloggc:/tmp/liferaygc1.log -XX:+PrintGCDetails -XX:+PrintGCApplicationConcurrentTime -
XX:+PrintGCApplicationStoppedTime
SO WHAT ARE SOME EXAMPLE SETTINGS?
A lot of what goes into JVM tuning has to deal with memory management. For a very detailed reference on memory
management in the Sun JVM, please see the Sun whitepaper, “Memory Management in the Java Hotspot Virtual Machine” at:
http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf
Reference Hardware: 2 quad(4)-core CPU machine with 8 GB memory
What do we do with that?
1 ) Check your portal server's CPU and memory.
Our portal server has 2 4-core CPUs, which means 8 CPUs and 8GB physical memory for the JVM.
17
18.
Because we have multiple CPUs, we should try to use a multi-threaded setting to speed up garbage collection (GC).
In the Sun JDK5, there are 4 built-in GC types: Serial Collector, Parallel Collector, Parallel Compacting Collector and
Concurrent Mark-Sweep (CMS) Collector. For our server, we will choose Concurrent Mark-Sweep (CMS) Collector, because we
have 8 CPUs and we need a short GC pause time. (For more detail, please read the Sun whitepaper, “Memory Management in
the Java Hotspot Virtual Machine”). Use -XX:+UseConcMarkSweepGC to turn on this option.
2) Fix your Xms and Xmx to a same value.
Because our server is a dedicated server for Liferay Portal, once you know a suitable heap size for the whole JVM, there is no
reason to define a range and let the JVM resize the heap. We should explicitly set the heap size to the suitable value. Use -
Xms2048m -Xmx2048m to set the heap size. (We will explain why it is 2048 later.)
3) Set the young generation size (Don't know what the young generation is? Please read see the Sun whitepaper, “Memory
Management in the Java Hotspot Virtual Machine”).
For the same reason as above, we should set the young generation size explicitly to a suitable size. Experimentally we will
make the young generation size 1/3 of the whole heap. Use -XX:NewSize=700m -XX:MaxNewSize=700m to set the young
generation size.
4) Set PermSize.
PermSpace is used to store class objects, so the size depends on how many classes do you have. In our case let’s just say that
128MB is big enough for now. If you get an OutOfMemory error complaining that there is no more space in PermSpace, you
should increase this value. Use -XX:MaxPermSize=128m to set the PermSize.
5) Set the SurvivorRatio to young generation.
There is no particular rule for this, the value is derived from observing a Java profiler (i.e. - VisualVM). You should try to make
survivor size bigger than the peak memory use size. Here we’ll set the ratio to 20. Use -XX:SurvivorRatio=20 to set the ratio.
18
19. [Monitoring the JVM heap and garbage collection in Visual GC]
Now let us talk about why set the heap size to 2048MB. We are using a 64-bit JVM, and we are aware that it can support more than a
2048MB heap size, but that does not mean setting the heap size to the maximum. Bigger is not always better. We chose a heap size that
is appropriate. The algorithm for GC tells us as the heap size increases linearly, the rate at which GC grows is actually faster than linear.
So we should just set the heap size to meet our need. In our case, through testing in our Java profiling tool, VisualVM, we chose 2048MB
for the heap size. From the statistics in the GC time for young generation and old generation, a suitable heap size is estimated. Generally
the average young generation GC time should around 20ms, while the old generation GC time should around 200ms~400ms.
The final startup parameters should look something similar to this*:
JAVA_OPTS="$JAVA_OPTS -XX:NewSize=700m -XX:MaxNewSize=700m -Xms2048m -Xmx2048m -XX:MaxPermSize=128m
-XX:+UseConcMarkSweepGC -XX:SurvivorRatio=10"
Additional Information
For more information on Liferay cluster settings, please see the Liferay Portal Administrator’s Guide at:
http://docs.liferay.com/portal/5.2/official/liferay-administration-guide.pdf
19
20.
Moving Forward
LIFERAY TRAINING
Liferay offers a Liferay System Administration course, where you can configure an actual Liferay cluster, hands-on from scratch. Please
see http://www.liferay.com/services/training/topics/system-administrator-training for more information.
Contact training@liferay.com for more information.
LIFERAY ENTERPRISE EDITION SUPPORT
Liferay Enterprise Edition ensures stability and reliable technical support for your Liferay Portal installation and your organization’s team.,
including a customer portal, product bulletins, security alerts, plus the support of over 60 partners worldwide.
LIFERAY PROFESSIONAL SERVICES
Liferay offers performance tuning and architecture assistance for your system. Since specific performance tuning settings may vary from
system to system, Liferay recommends thorough evaluation of your environment and business requirements before applying any of the
settings mentioned in this paper.
Contact sales@liferay.com for more information.
*Note: All of the configuration examples in 3rd-party software (i.e. – Apache, Sun Java) in this document are examples only. Please read the appropriate
documentation and apply the settings that are appropriate for your system. Liferay does not recommend these exact same settings for all systems.
20