SlideShare a Scribd company logo
High Availability & Load Balancing
Apache 2.2 & Tomcat 6.0


Gowrisankar Narayana
MCA, SCJP, SCWCD

gowrisankar.narayana@gmail.com
Presentation Format

 High availability
 Load balancing
 The Perfect Match - Apache 2.2 & Tomcat 6.0
 Introduction to Horizontal & Vertical Scaling
 HA and LB Practical Example
 Live Demo
 Q&A
High Availability                                           Application is deployed in each of
                                                            these nodes
                                            Server



              Internet


 Users
                       Server enables seamless failover
                       and state management                            Nodes


              System is always ready and available to serve users.

              Tolerates and overcomes faults and continues operating normally
              in the event of failure of some of its components.

              If the system experiences a failure, it continues to operate
              without interruption during the repair process.
Load Balancing                                                      All these nodes will be used under
                                                                    heavy load. Work is distributed and
                                                                    allotted by the server
                                           Server
                        Request 1

                                                                Request 1                   Request N

             Internet

                         Request N
                                                                                      Request 2
More Users                  Distributes work across all nodes
                                                                              Nodes


             Load is distributed evenly across all the available nodes.

             The node server ensures no node is overloaded and no node is too
             idle.

             More nodes can be added without downtime or interruption.
The Perfect Match - Apache 2 & Tomcat 6




                  APACHE 2
                 HTTP Server
                                                        Tomcat 6
                                                       Nodes/ Instances


         Apache is free & open source. Designed to provide a balance of
         flexibility, portability, and performance.

         Apache is the first web server software to surpass the 100 million web
         site milestone, so its the most-used Web server software package on
         the earth.

         Tomcat 6 is an open source servlet container developed by the
         Apache Software Foundation.
Horizontal and Vertical Scaling




Vertical Scaling: (Otherwise known as scaling up) means to add more hardware resources to the same
machine, generally by adding more processors and memory.
      • Expensive
      • Easy to implement
      • Single point of failure

Horizontal Scaling: (Otherwise known as scaling out) means to add more machines into the
mix, generally cheap commodity hardware.
      • Cheaper - at least more linear expenditures
      • Hard to implement
      • Many points of failure and therefore can usually handle
        failures elegantly
Live Example
Apache Proxy Configuration
         ProxyRequests On

         <Location /balancer-manager>
           SetHandler balancer-manager
           Order Allow,Deny
           Allow from all
         </Location>

         <Proxy balancer://ajpCluster>
           Order Allow,Deny
           Allow from all
           BalancerMember ajp://localhost:8209/app loadfactor=1
           BalancerMember ajp://localhost:8109/app status=+h
           ProxySet lbmethod=bytraffic
           ProxySet stickysession=JSESSIONID
         </Proxy>

         ProxyPreserveHost on
         ProxyPass /app balancer://ajpCluster/ stickysession=JSESSIONID
         ProxyPassReverse /app balancer://ajpCluster/ stickysession=JSESSIONID
Tomcat Configuration – Two Instances
       <Server port="8101"shutdown="SHUTDOWN">
       <GlobalNamingResources>
       <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
       description="User database that can beupdated and saved"
       factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
       </GlobalNamingResources>
       <Service name="Catalina">
       <!--Define an HTTP/1.1 Connector -->
       <Connector port="8180" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
       <!--Define an AJP 1.3 Connector -->
       <Connector port="8109" packetSize="20000" protocol="AJP/1.3" redirectPort="8443" />
       ...
       </Service>
       </Server>



        <Server port="8201"shutdown="SHUTDOWN">
        <GlobalNamingResources>
        <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
        description="User database that can beupdated and saved"
        factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
        </GlobalNamingResources>
        <Service name="Catalina">
        <!--Define an HTTP/1.1 Connector -->
        <Connector port="8280" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
        <!--Define an AJP 1.3 Connector -->
        <Connector port="8209" packetSize="20000" protocol="AJP/1.3" redirectPort="8443" />
        ...
        </Service>
        </Server>
Live Demo


       The Load Balancer Manager Interface :

       http://livedemo.opencampaign.co.uk/balancer-manager




        Load Balancer Manager At Work:

        http://livedemo.opencampaign.co.uk
Q&A
You can always contact me with your suggestions and comments

gowrisankar.narayana@gmail.com
07850151413

More Related Content

PDF
HA System-First presentation
PPTX
MySqL Failover by Weatherly Cloud Computing USA
PPTX
Distributed Performance testing by funkload
PDF
Load Balancer Device and Configurations.
PDF
Weblogic cluster
PDF
Until Successful Scope With Mule ESB
PDF
Implementing sql server always on
PPTX
Active mq Installation and Master Slave setup
HA System-First presentation
MySqL Failover by Weatherly Cloud Computing USA
Distributed Performance testing by funkload
Load Balancer Device and Configurations.
Weblogic cluster
Until Successful Scope With Mule ESB
Implementing sql server always on
Active mq Installation and Master Slave setup

What's hot (18)

PDF
Dokcer swarm
PDF
Highly available (ha) kubernetes
PPT
Weblogic-clustering-failover-and-load-balancing-training
PPTX
DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...
PDF
Time Machine
ODP
Devops madrid: successful case in AWS
PDF
Stream-Native Processing with Pulsar Functions
ODP
DevOps and Chef improve your life
PDF
Running Cloud Foundry for 12 months - An experience report | anynines
PDF
Load balancing basics
PDF
Delivering a production Cloud Foundry Environment with Bosh | anynines
PDF
Why stop the world when you can change it? Design and implementation of Incre...
PDF
Topology Service Injection using Dragonflow & Kuryr
PDF
Lifecycleofhostdeployedwithforemanandautomated
PDF
Designing a reactive data platform: Challenges, patterns, and anti-patterns
PPTX
Kafka Reliability Guarantees ATL Kafka User Group
PPTX
Enabling Security For ActiveMQ JMX Access
PDF
Unifying Messaging, Queueing & Light Weight Compute Using Apache Pulsar
Dokcer swarm
Highly available (ha) kubernetes
Weblogic-clustering-failover-and-load-balancing-training
DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...
Time Machine
Devops madrid: successful case in AWS
Stream-Native Processing with Pulsar Functions
DevOps and Chef improve your life
Running Cloud Foundry for 12 months - An experience report | anynines
Load balancing basics
Delivering a production Cloud Foundry Environment with Bosh | anynines
Why stop the world when you can change it? Design and implementation of Incre...
Topology Service Injection using Dragonflow & Kuryr
Lifecycleofhostdeployedwithforemanandautomated
Designing a reactive data platform: Challenges, patterns, and anti-patterns
Kafka Reliability Guarantees ATL Kafka User Group
Enabling Security For ActiveMQ JMX Access
Unifying Messaging, Queueing & Light Weight Compute Using Apache Pulsar
Ad

Similar to Webapplication Load Balancing (20)

PPT
Server Farms and XML Web Services
PDF
Characterizing and contrasting kuhn tey-ner awr-kuh-streyt-ors
PDF
OVS-LinuxCon 2013.pdf
PPTX
Introduction to Web Application Clustering
PDF
SQL Server Clustering and High Availability
PDF
Openstack HA
PDF
Load balancing and failover options
PPTX
Microservices with Spring
PDF
Introduction openstack-meetup-nov-28
PPT
Web Server/App Server Connectivity
PDF
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
PDF
Container World 2017 - Characterizing and Contrasting Container Orchestrators
PDF
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
PPTX
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
PPTX
Dragonflow Austin Summit Talk
PDF
High Availability for OpenStack
PDF
How To Set Up SQL Load Balancing with HAProxy - Slides
PPT
Tomcat 6: Evolving our server
PDF
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
PDF
Load Balancing MySQL with HAProxy - Slides
Server Farms and XML Web Services
Characterizing and contrasting kuhn tey-ner awr-kuh-streyt-ors
OVS-LinuxCon 2013.pdf
Introduction to Web Application Clustering
SQL Server Clustering and High Availability
Openstack HA
Load balancing and failover options
Microservices with Spring
Introduction openstack-meetup-nov-28
Web Server/App Server Connectivity
Characterizing and Contrasting Kuhn-tey-ner Awr-kuh-streyt-ors
Container World 2017 - Characterizing and Contrasting Container Orchestrators
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
SDN 101: Software Defined Networking Course - Sameh Zaghloul/IBM - 2014
Dragonflow Austin Summit Talk
High Availability for OpenStack
How To Set Up SQL Load Balancing with HAProxy - Slides
Tomcat 6: Evolving our server
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Load Balancing MySQL with HAProxy - Slides
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Review of recent advances in non-invasive hemoglobin estimation
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Diabetes mellitus diagnosis method based random forest with bat algorithm

Webapplication Load Balancing

  • 1. High Availability & Load Balancing Apache 2.2 & Tomcat 6.0 Gowrisankar Narayana MCA, SCJP, SCWCD gowrisankar.narayana@gmail.com
  • 2. Presentation Format  High availability  Load balancing  The Perfect Match - Apache 2.2 & Tomcat 6.0  Introduction to Horizontal & Vertical Scaling  HA and LB Practical Example  Live Demo  Q&A
  • 3. High Availability Application is deployed in each of these nodes Server Internet Users Server enables seamless failover and state management Nodes System is always ready and available to serve users. Tolerates and overcomes faults and continues operating normally in the event of failure of some of its components. If the system experiences a failure, it continues to operate without interruption during the repair process.
  • 4. Load Balancing All these nodes will be used under heavy load. Work is distributed and allotted by the server Server Request 1 Request 1 Request N Internet Request N Request 2 More Users Distributes work across all nodes Nodes Load is distributed evenly across all the available nodes. The node server ensures no node is overloaded and no node is too idle. More nodes can be added without downtime or interruption.
  • 5. The Perfect Match - Apache 2 & Tomcat 6 APACHE 2 HTTP Server Tomcat 6 Nodes/ Instances Apache is free & open source. Designed to provide a balance of flexibility, portability, and performance. Apache is the first web server software to surpass the 100 million web site milestone, so its the most-used Web server software package on the earth. Tomcat 6 is an open source servlet container developed by the Apache Software Foundation.
  • 6. Horizontal and Vertical Scaling Vertical Scaling: (Otherwise known as scaling up) means to add more hardware resources to the same machine, generally by adding more processors and memory. • Expensive • Easy to implement • Single point of failure Horizontal Scaling: (Otherwise known as scaling out) means to add more machines into the mix, generally cheap commodity hardware. • Cheaper - at least more linear expenditures • Hard to implement • Many points of failure and therefore can usually handle failures elegantly
  • 8. Apache Proxy Configuration ProxyRequests On <Location /balancer-manager> SetHandler balancer-manager Order Allow,Deny Allow from all </Location> <Proxy balancer://ajpCluster> Order Allow,Deny Allow from all BalancerMember ajp://localhost:8209/app loadfactor=1 BalancerMember ajp://localhost:8109/app status=+h ProxySet lbmethod=bytraffic ProxySet stickysession=JSESSIONID </Proxy> ProxyPreserveHost on ProxyPass /app balancer://ajpCluster/ stickysession=JSESSIONID ProxyPassReverse /app balancer://ajpCluster/ stickysession=JSESSIONID
  • 9. Tomcat Configuration – Two Instances <Server port="8101"shutdown="SHUTDOWN"> <GlobalNamingResources> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can beupdated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <Service name="Catalina"> <!--Define an HTTP/1.1 Connector --> <Connector port="8180" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <!--Define an AJP 1.3 Connector --> <Connector port="8109" packetSize="20000" protocol="AJP/1.3" redirectPort="8443" /> ... </Service> </Server> <Server port="8201"shutdown="SHUTDOWN"> <GlobalNamingResources> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can beupdated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <Service name="Catalina"> <!--Define an HTTP/1.1 Connector --> <Connector port="8280" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> <!--Define an AJP 1.3 Connector --> <Connector port="8209" packetSize="20000" protocol="AJP/1.3" redirectPort="8443" /> ... </Service> </Server>
  • 10. Live Demo The Load Balancer Manager Interface : http://livedemo.opencampaign.co.uk/balancer-manager Load Balancer Manager At Work: http://livedemo.opencampaign.co.uk
  • 11. Q&A You can always contact me with your suggestions and comments gowrisankar.narayana@gmail.com 07850151413