SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
Tarek Ali
 
Why stop the world when you can change it? Design and implementation of Incre...
Why stop the world when you can change it? Design and implementation of Incre...Why stop the world when you can change it? Design and implementation of Incre...
Why stop the world when you can change it? Design and implementation of Incre...
confluent
 
Lifecycleofhostdeployedwithforemanandautomated
LifecycleofhostdeployedwithforemanandautomatedLifecycleofhostdeployedwithforemanandautomated
Lifecycleofhostdeployedwithforemanandautomated
Kanwar Batra
 

La actualidad más candente (20)

AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
AWS re:Invent 2016: Deep Dive on Amazon EC2 Instances, Featuring Performance ...
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
Dokcer swarm
Dokcer swarmDokcer swarm
Dokcer swarm
 
Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
 
Weblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingWeblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-training
 
DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...
DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...
DevOps Fest 2019. Stanislav Kolenkin. Сonnecting pool Kubernetes clusters: Fe...
 
Time Machine
Time MachineTime Machine
Time Machine
 
Devops madrid: successful case in AWS
Devops madrid: successful case in AWSDevops madrid: successful case in AWS
Devops madrid: successful case in AWS
 
Stream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar FunctionsStream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar Functions
 
Another Day, Another Billion Packets
Another Day, Another Billion PacketsAnother Day, Another Billion Packets
Another Day, Another Billion Packets
 
DevOps and Chef improve your life
DevOps and Chef improve your life DevOps and Chef improve your life
DevOps and Chef improve your life
 
Running Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anyninesRunning Cloud Foundry for 12 months - An experience report | anynines
Running Cloud Foundry for 12 months - An experience report | anynines
 
Load balancing basics
Load balancing basicsLoad balancing basics
Load balancing basics
 
Delivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anyninesDelivering a production Cloud Foundry Environment with Bosh | anynines
Delivering a production Cloud Foundry Environment with Bosh | anynines
 
Why stop the world when you can change it? Design and implementation of Incre...
Why stop the world when you can change it? Design and implementation of Incre...Why stop the world when you can change it? Design and implementation of Incre...
Why stop the world when you can change it? Design and implementation of Incre...
 
Topology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & KuryrTopology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & Kuryr
 
Lifecycleofhostdeployedwithforemanandautomated
LifecycleofhostdeployedwithforemanandautomatedLifecycleofhostdeployedwithforemanandautomated
Lifecycleofhostdeployedwithforemanandautomated
 
Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns Designing a reactive data platform: Challenges, patterns, and anti-patterns
Designing a reactive data platform: Challenges, patterns, and anti-patterns
 
Kafka Reliability Guarantees ATL Kafka User Group
Kafka Reliability Guarantees ATL Kafka User GroupKafka Reliability Guarantees ATL Kafka User Group
Kafka Reliability Guarantees ATL Kafka User Group
 
Enabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX AccessEnabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX Access
 

Similar a Webapplication Load Balancing

Introduction to Web Application Clustering
Introduction to Web Application ClusteringIntroduction to Web Application Clustering
Introduction to Web Application Clustering
Piyush Katariya
 
Load balancing and failover options
Load balancing and failover optionsLoad balancing and failover options
Load balancing and failover options
maclean liu
 
Web Server/App Server Connectivity
Web Server/App Server ConnectivityWeb Server/App Server Connectivity
Web Server/App Server Connectivity
webhostingguy
 

Similar a Webapplication Load Balancing (20)

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

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

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