SlideShare una empresa de Scribd logo
1 de 11
MAKING APP CLUSTER
READY
Presented by
Pratyush Majumdar
CONTENTS
 What is Clustering
 Clustering Goals
 Implementation
 Load Balancing Basics
 Clustering jboss AS
 Clustering Web Application
 Demo
WHAT IS CLUSTERING
 Clustering allows you to run an application on several parallel servers
(cluster nodes) while providing a single view to application clients.
 Load is distributed across different servers, and even if one or more of
the servers fails, the application is still accessible via the surviving
cluster nodes.
 Clustering is crucial for scalable enterprise applications, as you can
improve performance by adding more nodes to the cluster.
 Clustering is crucial for highly available enterprise applications, as it is
the clustering infrastructure that supports the redundancy needed for
high availability.
CLUSTERING GOALS
 No single SPOF (Single Point Of Failure)
 Ability to increase application throughput by adding hardware
(Horizontal Scaling vs Vertical Scaling)
 Fault Tolerant
 Load Balancing
IMPLEMENTATION
LOAD BALANCING BASICS
 Apache vs Nginx
 Load balancing Algorithms
 Random
 Round Robin
 Weight Based
 Health checks
 Session stickiness vs ip-hash
CLUSTERING JBOSS AS (1/2)
 “all” Configuration
 Clustering Support
 Create multiple copies to run several instances on a single machine
 Partition
 The default name is "DefaultPartition". We can use separate names to segregate Development and Production Environment.
 Multicast
 By default JBoss AS uses UDP multicast for most intra-cluster communication.
 Pick a different multicast address for each cluster you run.
 Generally a good multicast address is of the form 239.255.x.y.
 Socket Binding
 Use of IP Address instead of 0.0.0.0
 Requirement of offset in-case of multiple instances on a single machine
 Server Peer ID
 This is needed for JBoss Messaging across clusters
 Changes in server.xml (Access Logger)
CLUSTERING JBOSS AS (2/2)
 Command for starting jboss cluster on separate physical severs
 ./run.sh -c node1 -g APPSERVER -u 239.255.100.100 -b 192.168.1.1 -
Djboss.messaging.ServerPeerID=1
 ./run.sh -c node2 -g APPSERVER -u 239.255.100.100 -b 192.168.1.2 -
Djboss.messaging.ServerPeerID=2
 Command for starting jboss cluster on a single physical sever
 ./run.sh -c node1 -g APPSERVER -u 239.255.100.100 -b 0.0.0.0 -
Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01
 ./run.sh -c node2 -g APPSERVER -u 239.255.100.100 -b 0.0.0.0 -
Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-02
CLUSTERING APPLICATION
 Dos
 Add <distributable/> tag in web.xml
 Serialize all http session beans
 Implement Quartz Cluster Scheduler
 Using a third party cache provider (EHCache+RMI) to minimize database hits
 Application should be deployable on “touch” of web.xml similarly should get un-deploy
on renaming it to .bak
 Don'ts
 Avoid using static maps, get data from database when required
 Avoid using I/O operations (document upload) otherwise use a common repository
 Avoid using Application Context unless its read-only
 Avoid using complex object in http session to keep replication state minimal
 Synchronization block in code will no longer work
DEMO
 Configuring Nginx
 Configuring jboss server
 Joining Cluster
 Application deployment
 Failover Demo
QUESTIONS?

Más contenido relacionado

La actualidad más candente

Stop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
Stop Exhausting Yourself in Operating Multiple Elasticsearch ClustersStop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
Stop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
LINE Corporation
 

La actualidad más candente (20)

Journey to Microservice architecture via Amazon Lambda
Journey to Microservice architecture via Amazon LambdaJourney to Microservice architecture via Amazon Lambda
Journey to Microservice architecture via Amazon Lambda
 
JBoss Developer Webinar: Cloud: BoxGrinder & SteamCannon
JBoss Developer Webinar: Cloud: BoxGrinder & SteamCannonJBoss Developer Webinar: Cloud: BoxGrinder & SteamCannon
JBoss Developer Webinar: Cloud: BoxGrinder & SteamCannon
 
OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra Summit
 
Windows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLetsWindows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLets
 
JUDCon 2010 Boston : CoolingTower and CirrAS
JUDCon 2010 Boston : CoolingTower and CirrASJUDCon 2010 Boston : CoolingTower and CirrAS
JUDCon 2010 Boston : CoolingTower and CirrAS
 
Re-Think of Virtualization and Containerization
Re-Think of Virtualization and ContainerizationRe-Think of Virtualization and Containerization
Re-Think of Virtualization and Containerization
 
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
OpenNebulaConf 2016 - Icinga2 - APIFY them all by Achim Ledermüller, Netways ...
 
Stop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
Stop Exhausting Yourself in Operating Multiple Elasticsearch ClustersStop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
Stop Exhausting Yourself in Operating Multiple Elasticsearch Clusters
 
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
WebCamp 2016: DevOps. Ярослав Погребняк: Gobetween - новый лоад балансер для ...
 
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
 
Introduction to mesos bay
Introduction to mesos bayIntroduction to mesos bay
Introduction to mesos bay
 
CICS provisioning toolkit
CICS provisioning toolkitCICS provisioning toolkit
CICS provisioning toolkit
 
WebCamp 2016: DevOps. Николай Дойков: Опыт создания клауда для потокового вид...
WebCamp 2016: DevOps. Николай Дойков: Опыт создания клауда для потокового вид...WebCamp 2016: DevOps. Николай Дойков: Опыт создания клауда для потокового вид...
WebCamp 2016: DevOps. Николай Дойков: Опыт создания клауда для потокового вид...
 
ZooKeeper - wait free protocol for coordinating processes
ZooKeeper - wait free protocol for coordinating processesZooKeeper - wait free protocol for coordinating processes
ZooKeeper - wait free protocol for coordinating processes
 
[MDBCI] Mariadb continuous integration tool
[MDBCI] Mariadb continuous integration tool[MDBCI] Mariadb continuous integration tool
[MDBCI] Mariadb continuous integration tool
 
Automating Azure VMs with PowerShell
Automating Azure VMs with PowerShellAutomating Azure VMs with PowerShell
Automating Azure VMs with PowerShell
 
SaltConf14 - Saurabh Surana, HP Cloud - Automating operations and support wit...
SaltConf14 - Saurabh Surana, HP Cloud - Automating operations and support wit...SaltConf14 - Saurabh Surana, HP Cloud - Automating operations and support wit...
SaltConf14 - Saurabh Surana, HP Cloud - Automating operations and support wit...
 
Integrating Docker with Mesos and Marathon
Integrating Docker with Mesos and MarathonIntegrating Docker with Mesos and Marathon
Integrating Docker with Mesos and Marathon
 
Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl
Troubleshooting Apache CloudStack at #ccceu14 by @jorizvlTroubleshooting Apache CloudStack at #ccceu14 by @jorizvl
Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl
 
OSMC 2017 | Icinga 2 + Director, flexible Thresholds with Ansible by Kevin H...
OSMC 2017 |  Icinga 2 + Director, flexible Thresholds with Ansible by Kevin H...OSMC 2017 |  Icinga 2 + Director, flexible Thresholds with Ansible by Kevin H...
OSMC 2017 | Icinga 2 + Director, flexible Thresholds with Ansible by Kevin H...
 

Similar a Making app cluster ready

Spring Cairngorm
Spring CairngormSpring Cairngorm
Spring Cairngorm
devaraj ns
 
Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
Tarek Ali
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde
Codemotion
 

Similar a Making app cluster ready (20)

Azure Design Review Checklist Availabilityの巻
Azure Design Review Checklist Availabilityの巻Azure Design Review Checklist Availabilityの巻
Azure Design Review Checklist Availabilityの巻
 
Deploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalkDeploying your web application with AWS ElasticBeanstalk
Deploying your web application with AWS ElasticBeanstalk
 
Cloudjiffy vs Amazon Elastic Beanstalk
Cloudjiffy vs Amazon Elastic BeanstalkCloudjiffy vs Amazon Elastic Beanstalk
Cloudjiffy vs Amazon Elastic Beanstalk
 
Windows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризацииWindows Server "10": что нового в кластеризации
Windows Server "10": что нового в кластеризации
 
OSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitOSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration Summit
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web Services
 
Building a Scalable Architecture for web apps
Building a Scalable Architecture for web appsBuilding a Scalable Architecture for web apps
Building a Scalable Architecture for web apps
 
2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin2013 05-multicloud-paas-interop-scenarios-fia-dublin
2013 05-multicloud-paas-interop-scenarios-fia-dublin
 
Spring Cairngorm
Spring CairngormSpring Cairngorm
Spring Cairngorm
 
今Serverlessが面白いわけ
今Serverlessが面白いわけ今Serverlessが面白いわけ
今Serverlessが面白いわけ
 
데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
데이터 마이그레이션 AWS와 같이하기 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
 
Highly available (ha) kubernetes
Highly available (ha) kubernetesHighly available (ha) kubernetes
Highly available (ha) kubernetes
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
 
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
 
Application Portability with Kubernetes (k8)
Application Portability with Kubernetes (k8)Application Portability with Kubernetes (k8)
Application Portability with Kubernetes (k8)
 
Move to azure
Move to azureMove to azure
Move to azure
 
5 simple steps to migrate to AWS
5 simple steps to migrate to AWS5 simple steps to migrate to AWS
5 simple steps to migrate to AWS
 
Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde Continuous Deployment with Amazon Web Services by Carlos Conde
Continuous Deployment with Amazon Web Services by Carlos Conde
 
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
Two Years, Zero servers: Lessons learned from running a startup 100% on Serve...
 

Más de Pratyush Majumdar (7)

An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed Optimisation
 
Aws Architecture Training
Aws Architecture TrainingAws Architecture Training
Aws Architecture Training
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitals
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
 
SEI CMMI presentation
SEI CMMI presentationSEI CMMI presentation
SEI CMMI presentation
 
Apache architecture
Apache architectureApache architecture
Apache architecture
 

Último

Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
MohammadAliNayeem
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Lovely Professional University
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
Kamal Acharya
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
BalamuruganV28
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 

Último (20)

Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdf
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
Complex plane, Modulus, Argument, Graphical representation of a complex numbe...
 
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
Activity Planning: Objectives, Project Schedule, Network Planning Model. Time...
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Lesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsxLesson no16 application of Induction Generator in Wind.ppsx
Lesson no16 application of Induction Generator in Wind.ppsx
 
Online crime reporting system project.pdf
Online crime reporting system project.pdfOnline crime reporting system project.pdf
Online crime reporting system project.pdf
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
ChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdfChatGPT Prompt Engineering for project managers.pdf
ChatGPT Prompt Engineering for project managers.pdf
 

Making app cluster ready

  • 1. MAKING APP CLUSTER READY Presented by Pratyush Majumdar
  • 2. CONTENTS  What is Clustering  Clustering Goals  Implementation  Load Balancing Basics  Clustering jboss AS  Clustering Web Application  Demo
  • 3. WHAT IS CLUSTERING  Clustering allows you to run an application on several parallel servers (cluster nodes) while providing a single view to application clients.  Load is distributed across different servers, and even if one or more of the servers fails, the application is still accessible via the surviving cluster nodes.  Clustering is crucial for scalable enterprise applications, as you can improve performance by adding more nodes to the cluster.  Clustering is crucial for highly available enterprise applications, as it is the clustering infrastructure that supports the redundancy needed for high availability.
  • 4. CLUSTERING GOALS  No single SPOF (Single Point Of Failure)  Ability to increase application throughput by adding hardware (Horizontal Scaling vs Vertical Scaling)  Fault Tolerant  Load Balancing
  • 6. LOAD BALANCING BASICS  Apache vs Nginx  Load balancing Algorithms  Random  Round Robin  Weight Based  Health checks  Session stickiness vs ip-hash
  • 7. CLUSTERING JBOSS AS (1/2)  “all” Configuration  Clustering Support  Create multiple copies to run several instances on a single machine  Partition  The default name is "DefaultPartition". We can use separate names to segregate Development and Production Environment.  Multicast  By default JBoss AS uses UDP multicast for most intra-cluster communication.  Pick a different multicast address for each cluster you run.  Generally a good multicast address is of the form 239.255.x.y.  Socket Binding  Use of IP Address instead of 0.0.0.0  Requirement of offset in-case of multiple instances on a single machine  Server Peer ID  This is needed for JBoss Messaging across clusters  Changes in server.xml (Access Logger)
  • 8. CLUSTERING JBOSS AS (2/2)  Command for starting jboss cluster on separate physical severs  ./run.sh -c node1 -g APPSERVER -u 239.255.100.100 -b 192.168.1.1 - Djboss.messaging.ServerPeerID=1  ./run.sh -c node2 -g APPSERVER -u 239.255.100.100 -b 192.168.1.2 - Djboss.messaging.ServerPeerID=2  Command for starting jboss cluster on a single physical sever  ./run.sh -c node1 -g APPSERVER -u 239.255.100.100 -b 0.0.0.0 - Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-01  ./run.sh -c node2 -g APPSERVER -u 239.255.100.100 -b 0.0.0.0 - Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-02
  • 9. CLUSTERING APPLICATION  Dos  Add <distributable/> tag in web.xml  Serialize all http session beans  Implement Quartz Cluster Scheduler  Using a third party cache provider (EHCache+RMI) to minimize database hits  Application should be deployable on “touch” of web.xml similarly should get un-deploy on renaming it to .bak  Don'ts  Avoid using static maps, get data from database when required  Avoid using I/O operations (document upload) otherwise use a common repository  Avoid using Application Context unless its read-only  Avoid using complex object in http session to keep replication state minimal  Synchronization block in code will no longer work
  • 10. DEMO  Configuring Nginx  Configuring jboss server  Joining Cluster  Application deployment  Failover Demo