SlideShare a Scribd company logo
3
Most read
7
Most read
9
Most read
  Tomcat Clustering   GouthamV   Sr.Software Engineer   InfoGroup
  Tomcat Clustering Why Clustering? Tomcat Clustering Model  Load Balancing types State/Session sharing types Example cluster  Configuration steps
  Why Clustering? Cluster: Group of application servers that transparently run a J2EE application as if it were a single entity  Enterprise applications must provide  Scalability  and  High  Availability(HA)  for web services in order to serve hundreds/thousands  of users. Scalability: System’s ability to support increasing number of users by adding  additional servers to cluster High Availability(HA): Providing redundancy in the system, if one cluster member crashes for  some reason, another member in the cluster can transparently take over  the web requests.
  Cluster Types Two types of clustering methods: Vertical Scaling and Horizontal Scaling 1. Vertical Scaling: Multiple number of servers running in single machine.  Ex: Server entapp4. Request can be served by any Tomkerb instance transparently TomkerbA TomkerbB TomkerbC
  Cluster Types Two types of clustering methods: Vertical Scaling and Horizontal Scaling 1. Horizontal Scaling: Independent  servers running in different machines. Request can be served by any  machine transparently. This is recommended strategy in production environment Ex:  entapp4A    entapp4B   entapp4C    Tomkerb Tomkerb Tomkerb
  Tomcat Clustering Model Load Balancing Front-end (many choices of technology) Tomcat server instance 1 Tomcat server instance 2 Tomcat server instance N  State/Session Sharing Back-end (many choices of technology) Incoming requests
Tomcat Load Balancing Apache  ---------------- mod_jk2 Incoming requests Coyote AJP  ---------------- Tomcat1 Overloaded Tomcat server Apache  ---------------- mod_jk2 Incoming requests Coyote AJP  ---------------- Tomcat2 Coyote AJP  ---------------- Tomcat3 Coyote AJP  ---------------- Tomcat1 Load balanced cluster Mod_jk2:  Apache module provides integration between Apache web server and Tomcat. Coyote AJP:  Provides communication channel between Apache and the running instances of    Tomcat.
  Load Balancing Types Round-robin DNS, whereby a domain name resolution results in a set of IP addresses A hardware-based load balancer A software-based load balancer (For ex: balance, an open source project) The balancer web application included with Tomcat5 for rule-based, application-level load  balancing Apache mod_jk2 as load balancer (Commonly used type)
State/Session Sharing Types Sticky sessions with no session sharing: - Easy to configure, no changes needed to the existing applications. If server crashes  session is lost -  Application scalability through  round-robin  load balancing. Sticky session with a Persistent Session Manager and a shared file restore Sticky session with a Persistent Session Manager and a JDBC store to RDBMS In-memory session replication - These above three require complex configuration and existing applications have to be  modified(All session objects should implement  Serializable  interface, etc) Sticky session:   Apache feature, when enabled on mod_jk2, it ensures all incoming requests with same session are routed to the same Tomcat 5 worker.
Configuration steps Create two tomcat instances Modify server.xml in two instances for Server port, Connector port, AJP/1.3 port (Not required for horizontal scaling) Modify workers.properties of apache web server to define list of workers Modify httpd.conf of apache web server to define balance as worker If session sharing required, uncomment <Cluster> tag in server.xml of tomcat workers and change TcpListenPort.

More Related Content

PPT
Tomcat Configuration (1)
PDF
Apache Tomcat 8 Application Server
PDF
Tomcat and apache httpd training
PPT
PDF
Introduction to Apache Tomcat 7 Presentation
PPT
Tomcat server
PPT
Tomcat Server
PDF
Tomcat Optimisation & Performance Tuning
Tomcat Configuration (1)
Apache Tomcat 8 Application Server
Tomcat and apache httpd training
Introduction to Apache Tomcat 7 Presentation
Tomcat server
Tomcat Server
Tomcat Optimisation & Performance Tuning

What's hot (20)

PPT
Auxiliary : Tomcat
PPT
Hacking Tomcat
PPTX
Introduction of Tomcat
PDF
Tomcat next
PDF
25 Apache Performance Tips
PPTX
Apache tomcat
PPTX
Web container and Apache Tomcat
PPT
Tomcat configuration
PPT
Apache Tomcat 7 by Filip Hanik
PPT
Apache TomEE - Tomcat with a kick
PDF
How to monitor and manage Apache Tomcat
PPTX
Apache Performance Tuning: Scaling Out
PDF
Apache Tomcat + Java EE = Apache TomEE
PPT
Tomcat New Evolution
PPT
Tomcat 6: Evolving our server
PPTX
플랫폼 통합을 위한 Client Module 개발 & 배포
PDF
Integrating Apache Web Server with Tomcat Application Server
PDF
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
PDF
Java servlet technology
DOC
Auxiliary : Tomcat
Hacking Tomcat
Introduction of Tomcat
Tomcat next
25 Apache Performance Tips
Apache tomcat
Web container and Apache Tomcat
Tomcat configuration
Apache Tomcat 7 by Filip Hanik
Apache TomEE - Tomcat with a kick
How to monitor and manage Apache Tomcat
Apache Performance Tuning: Scaling Out
Apache Tomcat + Java EE = Apache TomEE
Tomcat New Evolution
Tomcat 6: Evolving our server
플랫폼 통합을 위한 Client Module 개발 & 배포
Integrating Apache Web Server with Tomcat Application Server
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
Java servlet technology
Ad

Viewers also liked (15)

PPTX
Tomcat session clustering
PDF
Automated Tomcat Management
PDF
PPTX
Mule management console installation with Tomcat
PDF
Tomcat
PDF
Java ee com apache tom ee e tomee+ tdc - 2014
PDF
Instalación de Apache Tomcat 8
PDF
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
PPTX
Git tutorial
PPTX
Web service introduction 2
PDF
HB Smith에서는 AWS 이렇게 사용한다
PPT
APACHE TOMCAT
PDF
톰캣 운영 노하우
PDF
아마존웹서비스와 함께하는 클라우드 비용 최적화 전략 - 윤석찬 (AWS 코리아 테크에반젤리스트)
PDF
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
Tomcat session clustering
Automated Tomcat Management
Mule management console installation with Tomcat
Tomcat
Java ee com apache tom ee e tomee+ tdc - 2014
Instalación de Apache Tomcat 8
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Git tutorial
Web service introduction 2
HB Smith에서는 AWS 이렇게 사용한다
APACHE TOMCAT
톰캣 운영 노하우
아마존웹서비스와 함께하는 클라우드 비용 최적화 전략 - 윤석찬 (AWS 코리아 테크에반젤리스트)
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
Ad

Similar to Tomcat Clustering (20)

PPT
B2 2006 tomcat_clusters
PDF
Webapplication Load Balancing
PPT
Web Server/App Server Connectivity
PPTX
PDF
Apache lb
PPTX
Performance out
PPTX
Performance out
PPTX
Performance_Out.pptx
PPTX
Performance out
PPTX
Performance out
PPTX
Performance out
PPTX
Performance out
PPTX
PPTX
title
PPTX
Performance out
PPTX
Performance out
PPTX
Performance out
PDF
Clustering - october 2006
PPTX
Performance out
PDF
Tomcat from a cluster to the cloud on RP3
B2 2006 tomcat_clusters
Webapplication Load Balancing
Web Server/App Server Connectivity
Apache lb
Performance out
Performance out
Performance_Out.pptx
Performance out
Performance out
Performance out
Performance out
title
Performance out
Performance out
Performance out
Clustering - october 2006
Performance out
Tomcat from a cluster to the cloud on RP3

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Building Integrated photovoltaic BIPV_UPV.pdf
Electronic commerce courselecture one. Pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Tomcat Clustering

  • 1. Tomcat Clustering GouthamV Sr.Software Engineer InfoGroup
  • 2. Tomcat Clustering Why Clustering? Tomcat Clustering Model Load Balancing types State/Session sharing types Example cluster Configuration steps
  • 3. Why Clustering? Cluster: Group of application servers that transparently run a J2EE application as if it were a single entity Enterprise applications must provide Scalability and High Availability(HA) for web services in order to serve hundreds/thousands of users. Scalability: System’s ability to support increasing number of users by adding additional servers to cluster High Availability(HA): Providing redundancy in the system, if one cluster member crashes for some reason, another member in the cluster can transparently take over the web requests.
  • 4. Cluster Types Two types of clustering methods: Vertical Scaling and Horizontal Scaling 1. Vertical Scaling: Multiple number of servers running in single machine. Ex: Server entapp4. Request can be served by any Tomkerb instance transparently TomkerbA TomkerbB TomkerbC
  • 5. Cluster Types Two types of clustering methods: Vertical Scaling and Horizontal Scaling 1. Horizontal Scaling: Independent servers running in different machines. Request can be served by any machine transparently. This is recommended strategy in production environment Ex: entapp4A entapp4B entapp4C Tomkerb Tomkerb Tomkerb
  • 6. Tomcat Clustering Model Load Balancing Front-end (many choices of technology) Tomcat server instance 1 Tomcat server instance 2 Tomcat server instance N State/Session Sharing Back-end (many choices of technology) Incoming requests
  • 7. Tomcat Load Balancing Apache ---------------- mod_jk2 Incoming requests Coyote AJP ---------------- Tomcat1 Overloaded Tomcat server Apache ---------------- mod_jk2 Incoming requests Coyote AJP ---------------- Tomcat2 Coyote AJP ---------------- Tomcat3 Coyote AJP ---------------- Tomcat1 Load balanced cluster Mod_jk2: Apache module provides integration between Apache web server and Tomcat. Coyote AJP: Provides communication channel between Apache and the running instances of Tomcat.
  • 8. Load Balancing Types Round-robin DNS, whereby a domain name resolution results in a set of IP addresses A hardware-based load balancer A software-based load balancer (For ex: balance, an open source project) The balancer web application included with Tomcat5 for rule-based, application-level load balancing Apache mod_jk2 as load balancer (Commonly used type)
  • 9. State/Session Sharing Types Sticky sessions with no session sharing: - Easy to configure, no changes needed to the existing applications. If server crashes session is lost - Application scalability through round-robin load balancing. Sticky session with a Persistent Session Manager and a shared file restore Sticky session with a Persistent Session Manager and a JDBC store to RDBMS In-memory session replication - These above three require complex configuration and existing applications have to be modified(All session objects should implement Serializable interface, etc) Sticky session: Apache feature, when enabled on mod_jk2, it ensures all incoming requests with same session are routed to the same Tomcat 5 worker.
  • 10. Configuration steps Create two tomcat instances Modify server.xml in two instances for Server port, Connector port, AJP/1.3 port (Not required for horizontal scaling) Modify workers.properties of apache web server to define list of workers Modify httpd.conf of apache web server to define balance as worker If session sharing required, uncomment <Cluster> tag in server.xml of tomcat workers and change TcpListenPort.