SlideShare une entreprise Scribd 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

Contenu connexe

Tendances

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
 

Tendances (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
 

Similaire à 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
 

Similaire à 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...
 

Dernier

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Dernier (20)

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 

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