Load Balancing, Failover and Scalability with ColdFusion

© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Load Balancing, Failover and Scalability
with ColdFusion
Presenters
Mike Collins, Sr. Consultant
Priyank Shrivastava Sr. Product
Consultant
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Today’s Agenda
 Modeling for Scalability
 ColdFusion and Web Server Configurations
 ColdFusion Clustering
 Load Balancing with Connector
 Using the Tomcat Connector Admin
 Session Management Strategies
 Demo Load Balancing and Failover
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Application Scaling Techniques – Physical and Virtual
 Physical Server Scaling
 Vertical
 Horizontal
 Distributed
 VM Server Scaling
 Managed Experience
 Vertical
 Horizontal
 Distributed
 Popular Environments
 VMWare ESX
 Microsoft HyperV
 Citrix XenServer
Business Critical Apps need to be designed to provide the end user
uninterrupted service.
We will be looking look at building an environment to support Business
Critical Apps
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Physical Servers Techniques
 Many instances on each peer
 Greatest utilization of
hardware
 Most cost-effective
 Need to consider hardware
failures
Vertical Horizontal
 Peers are on other physical
servers
 Protects against hardware
failures
 Effective management of
workloads
 higher costs
Distributed
 Peers are located across
physical servers
 Each server has multiple
CF Instances
 Protects against
hardware failures
 More utilization of
available CPU
 Effective management of
workloads
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Virtual - VM Scaling Techniques
 Most Popular Scaling Model
 Managed environments perfect for creating
new servers
 Easily create reusable VM images
 VMs become the building blocks
 All in One - Web server and Application
Server
 Web server VMs - Application Pool VMs
 Popular Environments
 VMWare, HyperV
5
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
VM Building Blocks
 Need to establish your building block VMs
 OS
 CF Version and settings
 Web server
 JVM Settings
 Establish Vertical scalability
 Scale Up Test each VM
 Establish how many CF Instances can you run on each VM
 Establish how large a VM would be in terms of vCPU and memory,
 JVM settings
 Scale Out Test
 How many VMs do you need to meet your Response Time SLAs
without reaching 70%-80% saturation of CPU?
 Create a testing environments where you can get accurate numbers
6
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
VM Building Blocks – Know the limitations
 Test a single building block find it’s
limits so you know critical metrics
to determine how many vMs you
need to serve expected load
 Change the building blocks JVM
Heap, vCPUs, and retest limits tp
find a sweet spot giving you the
best throughput and performance
7
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sample VM Topologies
 Let’s take a look at some sample topologies
8
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Department Based Topology with Shared Data API
9
Finance
Load Balancer Loan Processing PDF Generation
REST Application Tier
REST DATA Tier
- DSNs
HTMLJSONJDBC
Database
Sales
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
HTMLJSONJDBC
Company Wide Topology
10
Account Management
Load Balancer
REST Application Tier
REST DATA Tier
- DSNs
HTMLJSONJDBC
Database
eCommerce SiteEnd Users
Back End
CRM Apps
Utilities
Event Gateways
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Frontend eCommerce with separate Web Server Pool
11
Load Balancer
Database
Web
Servers
Shoppers CRM Apps
eCommerce
Event Gateway
Orders
Corp Data Access
JDBC
REST
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Database
Client App – API Based Topology
 Single Page Apps
 REST API base applications
 JavaScript Apps
 Mobile
 API Access
12
JSONHTML
REST Application Tier
REST DATA Tier
- DSNs
Load Balancer(s)
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Application Failover Factors
 Application Failover
 Three servers is the ideal number for
a business critical app
 You can take one out of the pool and
still have 2 two remaining live.
 Your tolerance will vary
 Continuous Monitoring and Alerts
 Monitoring is part of failover
 Often will stop or shorten an outage
 The CF Unresponsive thread alert
with stack traces is a tool
13
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Syncing your Code and Resource Files
 Peers will need access to uniform set of source code and resource files
 Common ways
 Each peer can synch from a common network drive
 Build script can move files to all the servers
 Always possibility of something getting out of sync
 Need to consider if code could be sensitive to one server being updated prior to another
 Usually not an issue but scenarios could exist
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
LB, Scaling and Failover by Category
Category One
Cost $
 One server  VM
 2-3 Instances of CF
 Load Balanced with
Tomcat Connector
 Shared code base
 Session might be
lost on failover
 Email Alerts
15
Category Three
Cost $$$
 Three servers 
VMs
 2-3 Instances per
server
 Load Balance with
Hardware LB
 Code is synched
or build script
pushes to servers
 Seamless session
state on failover
 Cached Content
 Full monitoring
Category Four
Cost $$$$
 Six or more servers
 VMs
 2-3 Instances per
application
 Load Balance with
Hardware LB
 Multi location
 VM replication for
backup
 Code is synched
 Seamless session
state on failover
 Dist Cached
Content
 Full Monitoring
Category Two
Cost $$
 Two servers  VMs
 2-3 Instances per
server
 Load Balanced with
Tomcat Connector or
Hardware Load
Balancer
 Code is synched or
build updates both
servers
 Smaller chance of
lost sessions on
failover
 Email Alerts
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Load Balancing Scalability and Failover with ColdFusion
Priyank Shrivastava| Sr. Product Consultant
Load Balancing, Scalability and Failover with ColdFusion
Priyank Shrivastava | Sr. Product Consultant
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Reliability
 Availability
 Scalability
Advantages of Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
How to setup Distributed Environment?
Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Distributed Environment
 Single Server Setup
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Copy these folders from ColdFusion directory to Webserver machine
How to setup Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Copy these folders from ColdFusion directory to Webserver machine
How to setup Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Copy these folders from ColdFusion directory to Webserver machine
How to setup Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Required directories copied
 Install Microsoft Visual C++ Redistributable
(2008 and 2012 32 bit/64 bit)
 Command to create the connector
How to setup Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Command to create the connector
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Required directories copied
 Install Microsoft Visual C++ Redistributable
(2008 and 2012 32 bit/64 bit)
 Command to create the connector
How to setup Distributed Environment
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
How to setup Distributed Environment with ColdFusion Cluster?
Distributed Environment with Cluster
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Distributed Environment with Cluster
 ColdFusion Cluster setup
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Distributed Environment with Cluster
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Copy these additional XMLs from ColdFusion config folder to
Webserver machine
How to setup Distributed Environment in a cluster
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Command to create the connector
How to setup Distributed Environment in a cluster
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Workers Properties file
Connector Properties
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Connector port
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Check the ColdFusion Handlers
 Check the ISAPI Filter
 Check the Connector folder and files
 Check if the ISAPI_REDIRECT.dll is correct
Check List
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
 Microsoft Visual C++ Redistributable (2008 and 2012 32 bit/64 bit)
 Port should be open
 Required files needs to be copied
Things to remember
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Reference links
http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in-
distributed-envionment
https://helpx.adobe.com/coldfusion/configuring-
administering/using-multiple-server-instances.html
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thank you
cfsup@adobe.com
cf.install@adobe.com
Priyank Shrivastava.
priyank_adobe
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Clustering and Load Balancing Decision Points
 Do you have a Load Balancer routing
traffic, monitoring connectivity?
 Do we need to share state across peers?
 Do you have any tolerance for throwing
errors on failover?
 Can the server go down for 15 minutes
from time to time?
44
Each application will have different requirements
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Clustering Basics
 Clustering Basics
 Allows for 2 or more peer servers to work together
 Peers can be local or remote
 Uses Multicast to auto recognize when peers are up or down
 Can be defined in the ColdFusion Administrator
 When the Web Server Connector is setup it builds the load balancing rules based on the cluster
you have defined.
 Additional Properties and settings are located in these files
 Cluster.xml
 Server.xml
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Getting Started with Clustering – Creating Instances
 Uses the cfusion instance to seed the new
instance
 Do no use cfusion inside a defined cluster
 Use cfusion as your baseline instance
 Setup any default datasources and
settings in cfusion
 Settings are brought over
 Make sure JVM arguments do not conflict
such as port numbers on any custom
settings
 Review ports in
{instancename}/runtime/config/server.xml
 JVMRoute Property should be unique in
server.xml
46
 Requires CF Enterprise
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Cluster Setup
 What does it do when I setup a
cluster?
 When you create a cluster you are
building the Network support to
allow the peers to auto discover
each other
 Needed for in memory session
replication and failover
 Settings are added to the
server.xml file
 It does not setup Load Balancing
 Load Balancing is setup when the
connector is defined
47
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Cluster Setup – Remote Instances are supported
Default 8985/8987 (in jetty.xml)
Must be unique for session affinity
Weighted round robin
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Clustering and Load Balancing
 Clustering
 Auto discovery of peers required to
support in memory session replication
 Edits the Server.xml with multicast
settings so peers can have a
backchannel to communicate
 Clustering setup in the CF Admin does
nothing for Load Balancing
 Essentially the Cluster Setup in the CF
Admin gives you the support for in
memory session replication
49
 Load balancing is done when you define the
web server connector
 But wait Adobe does not recommend in memory
session replication
 Do I even need to setup a cluster if I just want
load balancing
 No you don’t
 However you might want to use it to initially
setup your connector files to get started with
load balancing
 Once your connector settings are setup to
load balance you can delete your cluster in
the CF Admin
Load balancing does not require CF Enterprise just
make sure each server has it’s own Standard
license.
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Connector Setup for a Cluster
 Run wsconfog.exe or remote
command
 Once completed you will get a
numbered directory with
configuration
 Your load balancing is now defined
in the workers.properties file
50
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Connector Setup for Cluster – workers.properties
 You will get a worker.properties that looks
something this 
 Hosts
 Can be local or remote
 The CF Server needs a Connector defined
in the server.xml
 CF Servers can define more then one
connector as well
 Status Worker
 Allows you to monitor and edit peers
 Mount to a protected url path
 Restarting website in IIS will reload
connector settings
 CF 11 Updater 4 and below- Make sure to
save any settings because this file is
replaced if you update rebuild the
Connector. U5 now backs up properties
files if you update the connector.
51
worker.list=mycluster,status
worker.mycluster.type=lb
worker.mycluster.balance_workers=peer1,peer2,peer3
worker.mycluster.sticky_session=false
worker.balancer.method=B
worker.peer1.type=ajp13
worker.peer1.host=localhost
worker.peer1.port=8013
worker.peer1.max_reuse_connections=250
worker.peer1.lbfactor=1
worker.peer1.route=peer1
worker.peer2.type=ajp13
worker.peer2.host=localhost
worker.peer2.port=8016
worker.peer2.max_reuse_connections=250
worker.peer2.lbfactor=1
worker.peer2.route=peer2
worker.status.type=status
worker.status.mount=/admin/status/jk
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Changing the Workers.Properties
 You can ecit worker properties
anytime
 Add Peers
 Disable Peers
 Chance Load Balancer settings
 Simply Restart web site reload the
connector which will bring in new
settings.
52
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using the Connector Admin
 Built into the Tomcat
Connector
53
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Options Around Session Management
 Sticky Session – Server Affinity
 Must turn on J2EE Sessions
 Easy setup - Works great
 Must have some tolerance for errors on a failover
 Needs in memory session replication to get seamless failover, however session failover has limitations and is not
recommended by Adobe CF team
 Client Scope
 Setup client scope to be stored in database
 Great solution for seamless failover
 Great solution for round robin load balancing
 Need to probably write your own purge routine to best control timing of the purges and to control locking
 Distributed Caching – EHCache
 Great solution similar to Client Scope just different mechanism
 Can take the work off your database
 Needs some expertise to setup and maintain
 Check out the EHCache Session from CFSummit 2015 about some great new features
 Custom Solution
 Nothing to stop you from writing your own solution into the database, shared file system etc
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Hardware LB vs Software LB
 Hardware LB
 is the most common on scalable architectures
 Network Probe determines outage
 Also supports HTTP probe which can call a CF page to
determine database health etc
 Software LB offers low cost option to seamlessly take
out peers from the pool
 Tomcat Connector Load Balancing
 HAProxy
55
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Demo Application Failover
 What we will see in the demo
 Create 3 peers that are load balanced with worker.properies
settings
 Create Load on Web server(s)
 Application is setup to use Client scope for user information
 Client scope is defined to go to the database
 Gracefully take server out of pool using Tomcat Connector admin
 Restart IIS website to bring in new connector settings
 Watch peers pick up traffic
 Look to see of server threw any errors
 Place server back into pool
 Restart IIS website to bring in pool changes made with Tomcat
connector admin
 Peers pick up traffic
© 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Questions
1 of 52

Recommended

Expand Your ColdFusion App Power with AWS by
Expand Your ColdFusion App Power with AWSExpand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSColdFusionConference
660 views55 slides
Hidden gems in cf2016 by
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016ColdFusionConference
564 views52 slides
Workflows and Digital Signatures by
Workflows and Digital SignaturesWorkflows and Digital Signatures
Workflows and Digital SignaturesColdFusionConference
1.1K views28 slides
Migration to ColdFusion 11 – making it seamless and easy anit by
Migration to ColdFusion 11 – making it seamless and easy   anitMigration to ColdFusion 11 – making it seamless and easy   anit
Migration to ColdFusion 11 – making it seamless and easy anitColdFusionConference
4.8K views40 slides
Securing applications by
Securing applicationsSecuring applications
Securing applicationsColdFusionConference
403 views44 slides
Command box by
Command boxCommand box
Command boxColdFusionConference
494 views44 slides

More Related Content

What's hot

Keep Applications Online by
Keep Applications OnlineKeep Applications Online
Keep Applications OnlineColdFusionConference
258 views19 slides
ColdFusion builder plugins by
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder pluginsColdFusionConference
706 views23 slides
Locking Down CF Servers by
Locking Down CF ServersLocking Down CF Servers
Locking Down CF ServersColdFusionConference
683 views47 slides
Bring api manager into your stack by
Bring api manager into your stackBring api manager into your stack
Bring api manager into your stackColdFusionConference
378 views33 slides
10 Reasons ColdFusion PDFs should rule the world by
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the worldColdFusionConference
2.3K views53 slides
Super Fast Application development with Mura CMS by
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMSColdFusionConference
1K views155 slides

What's hot(20)

Clustering Multiple Instances in Cold Fusion by Mindfire Solutions
Clustering Multiple Instances in Cold FusionClustering Multiple Instances in Cold Fusion
Clustering Multiple Instances in Cold Fusion
Mindfire Solutions1.6K views
Intro to Coldfusion by Terry Ryan
Intro to ColdfusionIntro to Coldfusion
Intro to Coldfusion
Terry Ryan2.2K views
Serverless Media Workflow by MooYeol Lee
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
MooYeol Lee30.9K views

Viewers also liked

PostCSS: A dumb name for an awesome thing by
PostCSS: A dumb name for an awesome thingPostCSS: A dumb name for an awesome thing
PostCSS: A dumb name for an awesome thingColdFusionConference
384 views22 slides
Java scriptconfusingbits by
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbitsColdFusionConference
441 views264 slides
In The Trenches With Tomster, Upgrading Ember.js & Ember Data by
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataColdFusionConference
470 views53 slides
Paying off-emotional-debt-2 by
Paying off-emotional-debt-2Paying off-emotional-debt-2
Paying off-emotional-debt-2ColdFusionConference
444 views72 slides
Garbage First & You by
Garbage First & YouGarbage First & You
Garbage First & YouColdFusionConference
369 views58 slides
Marketing for developers by
Marketing for developersMarketing for developers
Marketing for developersColdFusionConference
559 views42 slides

Viewers also liked(20)

In The Trenches With Tomster, Upgrading Ember.js & Ember Data by ColdFusionConference
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
Level up your front-end skills- going beyond cold fusion’s ui tags by ColdFusionConference
Level up your front-end skills- going beyond cold fusion’s ui tagsLevel up your front-end skills- going beyond cold fusion’s ui tags
Level up your front-end skills- going beyond cold fusion’s ui tags
Solving Frequent ColdFusion Server Problems in New and Better Ways by ColdFusionConference
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better Ways

Similar to Load Balancing, Failover and Scalability with ColdFusion

2014 cf summit_clustering by
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clusteringColdFusionConference
2K views40 slides
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode by
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeContinuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeIBM UrbanCode Products
3.5K views23 slides
Helping Organizations Realize the Value of DevOps with Continuous Software De... by
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...IBM UrbanCode Products
1.2K views22 slides
Private Cloud Academy: Backup and DPM 2010 by
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Aidan Finn
1.3K views63 slides
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep... by
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...IBM Systems UKI
1.4K views33 slides
Virtualization aware Java VM by
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VMTim Ellison
2.4K views32 slides

Similar to Load Balancing, Failover and Scalability with ColdFusion(20)

Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode by IBM UrbanCode Products
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeContinuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Helping Organizations Realize the Value of DevOps with Continuous Software De... by IBM UrbanCode Products
Helping Organizations Realize the Value of DevOps with Continuous Software De...Helping Organizations Realize the Value of DevOps with Continuous Software De...
Helping Organizations Realize the Value of DevOps with Continuous Software De...
Private Cloud Academy: Backup and DPM 2010 by Aidan Finn
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010
Aidan Finn1.3K views
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep... by IBM Systems UKI
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
IBM Systems UKI1.4K views
Virtualization aware Java VM by Tim Ellison
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VM
Tim Ellison2.4K views
FATC UK - Real time collaborative Flex apps by Michael Chaize
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex apps
Michael Chaize610 views
Jeffrey Richter by CodeFest
Jeffrey RichterJeffrey Richter
Jeffrey Richter
CodeFest1.6K views
QCon Shanghai: Trends in Application Development by Chris Bailey
QCon Shanghai: Trends in Application DevelopmentQCon Shanghai: Trends in Application Development
QCon Shanghai: Trends in Application Development
Chris Bailey739 views
Enterprise Java Virtualization, Sacha Labourey by OpenBlend society
Enterprise Java Virtualization, Sacha LaboureyEnterprise Java Virtualization, Sacha Labourey
Enterprise Java Virtualization, Sacha Labourey
OpenBlend society674 views
AWS Certified Cloud Practitioner Course S7-S10 by Neal Davis
AWS Certified Cloud Practitioner Course S7-S10AWS Certified Cloud Practitioner Course S7-S10
AWS Certified Cloud Practitioner Course S7-S10
Neal Davis4.4K views
Serverless meetup Auckland #6 by Myles Henaghan
Serverless meetup Auckland #6Serverless meetup Auckland #6
Serverless meetup Auckland #6
Myles Henaghan324 views
VMworld 2013: Protecting Enterprise Workloads Within a vCloud Service Provide... by VMworld
VMworld 2013: Protecting Enterprise Workloads Within a vCloud Service Provide...VMworld 2013: Protecting Enterprise Workloads Within a vCloud Service Provide...
VMworld 2013: Protecting Enterprise Workloads Within a vCloud Service Provide...
VMworld278 views
Pivotal Platform - December Release A First Look by VMware Tanzu
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
VMware Tanzu470 views
ColdFusion 11 Overview - CFSummit 2013 by Rupesh Kumar
ColdFusion 11 Overview - CFSummit 2013ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013
Rupesh Kumar484 views
System Center 2012 Virtual Machine Manager by Norman Mayes
System Center 2012 Virtual Machine ManagerSystem Center 2012 Virtual Machine Manager
System Center 2012 Virtual Machine Manager
Norman Mayes1.8K views
Retiring Technical Debt by Leveraging Existing Microsoft Licenses on AWS by Amazon Web Services
Retiring Technical Debt by Leveraging Existing Microsoft Licenses on AWSRetiring Technical Debt by Leveraging Existing Microsoft Licenses on AWS
Retiring Technical Debt by Leveraging Existing Microsoft Licenses on AWS

More from ColdFusionConference

Api manager preconference by
Api manager preconferenceApi manager preconference
Api manager preconferenceColdFusionConference
1.7K views59 slides
Cf ppt vsr by
Cf ppt vsrCf ppt vsr
Cf ppt vsrColdFusionConference
864 views8 slides
Building better SQL Server Databases by
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server DatabasesColdFusionConference
641 views39 slides
API Economy, Realizing the Business Value of APIs by
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsColdFusionConference
777 views23 slides
Don't just pdf, Smart PDF by
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDFColdFusionConference
1.4K views24 slides
Crafting ColdFusion Applications like an Architect by
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectColdFusionConference
652 views33 slides

More from ColdFusionConference(20)

Security And Access Control For APIS using CF API Manager by ColdFusionConference
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
Developer Insights for Application Upgrade to ColdFusion 2016 by ColdFusionConference
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
ColdFusion Keynote: Building the Agile Web Since 1995 by ColdFusionConference
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
Build your own secure and real-time dashboard for mobile and web by ColdFusionConference
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
Herding cats managing ColdFusion servers with commandbox by ColdFusionConference
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
Everyones invited! Meet accesibility requirements with ColdFusion by ColdFusionConference
Everyones invited! Meet accesibility requirements with ColdFusionEveryones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusion

Recently uploaded

Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
129 views10 slides
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Moses Kemibaro
35 views38 slides
Future of Indian ConsumerTech by
Future of Indian ConsumerTechFuture of Indian ConsumerTech
Future of Indian ConsumerTechKapil Khandelwal (KK)
36 views68 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
207 views54 slides
CryptoBotsAI by
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
42 views5 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
139 views15 slides

Recently uploaded(20)

Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue129 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue207 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue224 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10145 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue265 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue108 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue137 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue120 views

Load Balancing, Failover and Scalability with ColdFusion

  • 1. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Load Balancing, Failover and Scalability with ColdFusion Presenters Mike Collins, Sr. Consultant Priyank Shrivastava Sr. Product Consultant
  • 2. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Today’s Agenda  Modeling for Scalability  ColdFusion and Web Server Configurations  ColdFusion Clustering  Load Balancing with Connector  Using the Tomcat Connector Admin  Session Management Strategies  Demo Load Balancing and Failover
  • 3. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Application Scaling Techniques – Physical and Virtual  Physical Server Scaling  Vertical  Horizontal  Distributed  VM Server Scaling  Managed Experience  Vertical  Horizontal  Distributed  Popular Environments  VMWare ESX  Microsoft HyperV  Citrix XenServer Business Critical Apps need to be designed to provide the end user uninterrupted service. We will be looking look at building an environment to support Business Critical Apps
  • 4. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Physical Servers Techniques  Many instances on each peer  Greatest utilization of hardware  Most cost-effective  Need to consider hardware failures Vertical Horizontal  Peers are on other physical servers  Protects against hardware failures  Effective management of workloads  higher costs Distributed  Peers are located across physical servers  Each server has multiple CF Instances  Protects against hardware failures  More utilization of available CPU  Effective management of workloads
  • 5. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Virtual - VM Scaling Techniques  Most Popular Scaling Model  Managed environments perfect for creating new servers  Easily create reusable VM images  VMs become the building blocks  All in One - Web server and Application Server  Web server VMs - Application Pool VMs  Popular Environments  VMWare, HyperV 5
  • 6. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. VM Building Blocks  Need to establish your building block VMs  OS  CF Version and settings  Web server  JVM Settings  Establish Vertical scalability  Scale Up Test each VM  Establish how many CF Instances can you run on each VM  Establish how large a VM would be in terms of vCPU and memory,  JVM settings  Scale Out Test  How many VMs do you need to meet your Response Time SLAs without reaching 70%-80% saturation of CPU?  Create a testing environments where you can get accurate numbers 6
  • 7. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. VM Building Blocks – Know the limitations  Test a single building block find it’s limits so you know critical metrics to determine how many vMs you need to serve expected load  Change the building blocks JVM Heap, vCPUs, and retest limits tp find a sweet spot giving you the best throughput and performance 7
  • 8. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sample VM Topologies  Let’s take a look at some sample topologies 8
  • 9. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Department Based Topology with Shared Data API 9 Finance Load Balancer Loan Processing PDF Generation REST Application Tier REST DATA Tier - DSNs HTMLJSONJDBC Database Sales
  • 10. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. HTMLJSONJDBC Company Wide Topology 10 Account Management Load Balancer REST Application Tier REST DATA Tier - DSNs HTMLJSONJDBC Database eCommerce SiteEnd Users Back End CRM Apps Utilities Event Gateways
  • 11. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Frontend eCommerce with separate Web Server Pool 11 Load Balancer Database Web Servers Shoppers CRM Apps eCommerce Event Gateway Orders Corp Data Access JDBC REST
  • 12. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Database Client App – API Based Topology  Single Page Apps  REST API base applications  JavaScript Apps  Mobile  API Access 12 JSONHTML REST Application Tier REST DATA Tier - DSNs Load Balancer(s)
  • 13. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Application Failover Factors  Application Failover  Three servers is the ideal number for a business critical app  You can take one out of the pool and still have 2 two remaining live.  Your tolerance will vary  Continuous Monitoring and Alerts  Monitoring is part of failover  Often will stop or shorten an outage  The CF Unresponsive thread alert with stack traces is a tool 13
  • 14. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Syncing your Code and Resource Files  Peers will need access to uniform set of source code and resource files  Common ways  Each peer can synch from a common network drive  Build script can move files to all the servers  Always possibility of something getting out of sync  Need to consider if code could be sensitive to one server being updated prior to another  Usually not an issue but scenarios could exist
  • 15. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. LB, Scaling and Failover by Category Category One Cost $  One server VM  2-3 Instances of CF  Load Balanced with Tomcat Connector  Shared code base  Session might be lost on failover  Email Alerts 15 Category Three Cost $$$  Three servers VMs  2-3 Instances per server  Load Balance with Hardware LB  Code is synched or build script pushes to servers  Seamless session state on failover  Cached Content  Full monitoring Category Four Cost $$$$  Six or more servers VMs  2-3 Instances per application  Load Balance with Hardware LB  Multi location  VM replication for backup  Code is synched  Seamless session state on failover  Dist Cached Content  Full Monitoring Category Two Cost $$  Two servers VMs  2-3 Instances per server  Load Balanced with Tomcat Connector or Hardware Load Balancer  Code is synched or build updates both servers  Smaller chance of lost sessions on failover  Email Alerts
  • 16. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Load Balancing Scalability and Failover with ColdFusion Priyank Shrivastava| Sr. Product Consultant Load Balancing, Scalability and Failover with ColdFusion Priyank Shrivastava | Sr. Product Consultant
  • 17. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Distributed Environment
  • 18. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Reliability  Availability  Scalability Advantages of Distributed Environment
  • 19. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. How to setup Distributed Environment? Distributed Environment
  • 20. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Distributed Environment  Single Server Setup
  • 21. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Distributed Environment
  • 22. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Copy these folders from ColdFusion directory to Webserver machine How to setup Distributed Environment
  • 23. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Copy these folders from ColdFusion directory to Webserver machine How to setup Distributed Environment
  • 24. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Copy these folders from ColdFusion directory to Webserver machine How to setup Distributed Environment
  • 25. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Required directories copied  Install Microsoft Visual C++ Redistributable (2008 and 2012 32 bit/64 bit)  Command to create the connector How to setup Distributed Environment
  • 26. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Command to create the connector
  • 27. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Required directories copied  Install Microsoft Visual C++ Redistributable (2008 and 2012 32 bit/64 bit)  Command to create the connector How to setup Distributed Environment
  • 28. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. How to setup Distributed Environment with ColdFusion Cluster? Distributed Environment with Cluster
  • 29. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Distributed Environment with Cluster  ColdFusion Cluster setup
  • 30. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Distributed Environment with Cluster
  • 31. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Copy these additional XMLs from ColdFusion config folder to Webserver machine How to setup Distributed Environment in a cluster
  • 32. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Command to create the connector How to setup Distributed Environment in a cluster
  • 33. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Workers Properties file Connector Properties
  • 34. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Connector port
  • 35. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Check the ColdFusion Handlers  Check the ISAPI Filter  Check the Connector folder and files  Check if the ISAPI_REDIRECT.dll is correct Check List
  • 36. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.  Microsoft Visual C++ Redistributable (2008 and 2012 32 bit/64 bit)  Port should be open  Required files needs to be copied Things to remember
  • 37. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Reference links http://blogs.coldfusion.com/post.cfm/setting-up-coldfusion-in- distributed-envionment https://helpx.adobe.com/coldfusion/configuring- administering/using-multiple-server-instances.html
  • 38. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Thank you cfsup@adobe.com cf.install@adobe.com Priyank Shrivastava. priyank_adobe
  • 39. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Clustering and Load Balancing Decision Points  Do you have a Load Balancer routing traffic, monitoring connectivity?  Do we need to share state across peers?  Do you have any tolerance for throwing errors on failover?  Can the server go down for 15 minutes from time to time? 44 Each application will have different requirements
  • 40. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ColdFusion Clustering Basics  Clustering Basics  Allows for 2 or more peer servers to work together  Peers can be local or remote  Uses Multicast to auto recognize when peers are up or down  Can be defined in the ColdFusion Administrator  When the Web Server Connector is setup it builds the load balancing rules based on the cluster you have defined.  Additional Properties and settings are located in these files  Cluster.xml  Server.xml
  • 41. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Getting Started with Clustering – Creating Instances  Uses the cfusion instance to seed the new instance  Do no use cfusion inside a defined cluster  Use cfusion as your baseline instance  Setup any default datasources and settings in cfusion  Settings are brought over  Make sure JVM arguments do not conflict such as port numbers on any custom settings  Review ports in {instancename}/runtime/config/server.xml  JVMRoute Property should be unique in server.xml 46  Requires CF Enterprise
  • 42. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ColdFusion Cluster Setup  What does it do when I setup a cluster?  When you create a cluster you are building the Network support to allow the peers to auto discover each other  Needed for in memory session replication and failover  Settings are added to the server.xml file  It does not setup Load Balancing  Load Balancing is setup when the connector is defined 47
  • 43. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Cluster Setup – Remote Instances are supported Default 8985/8987 (in jetty.xml) Must be unique for session affinity Weighted round robin
  • 44. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ColdFusion Clustering and Load Balancing  Clustering  Auto discovery of peers required to support in memory session replication  Edits the Server.xml with multicast settings so peers can have a backchannel to communicate  Clustering setup in the CF Admin does nothing for Load Balancing  Essentially the Cluster Setup in the CF Admin gives you the support for in memory session replication 49  Load balancing is done when you define the web server connector  But wait Adobe does not recommend in memory session replication  Do I even need to setup a cluster if I just want load balancing  No you don’t  However you might want to use it to initially setup your connector files to get started with load balancing  Once your connector settings are setup to load balance you can delete your cluster in the CF Admin Load balancing does not require CF Enterprise just make sure each server has it’s own Standard license.
  • 45. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. ColdFusion Connector Setup for a Cluster  Run wsconfog.exe or remote command  Once completed you will get a numbered directory with configuration  Your load balancing is now defined in the workers.properties file 50
  • 46. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Connector Setup for Cluster – workers.properties  You will get a worker.properties that looks something this   Hosts  Can be local or remote  The CF Server needs a Connector defined in the server.xml  CF Servers can define more then one connector as well  Status Worker  Allows you to monitor and edit peers  Mount to a protected url path  Restarting website in IIS will reload connector settings  CF 11 Updater 4 and below- Make sure to save any settings because this file is replaced if you update rebuild the Connector. U5 now backs up properties files if you update the connector. 51 worker.list=mycluster,status worker.mycluster.type=lb worker.mycluster.balance_workers=peer1,peer2,peer3 worker.mycluster.sticky_session=false worker.balancer.method=B worker.peer1.type=ajp13 worker.peer1.host=localhost worker.peer1.port=8013 worker.peer1.max_reuse_connections=250 worker.peer1.lbfactor=1 worker.peer1.route=peer1 worker.peer2.type=ajp13 worker.peer2.host=localhost worker.peer2.port=8016 worker.peer2.max_reuse_connections=250 worker.peer2.lbfactor=1 worker.peer2.route=peer2 worker.status.type=status worker.status.mount=/admin/status/jk
  • 47. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Changing the Workers.Properties  You can ecit worker properties anytime  Add Peers  Disable Peers  Chance Load Balancer settings  Simply Restart web site reload the connector which will bring in new settings. 52
  • 48. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Using the Connector Admin  Built into the Tomcat Connector 53
  • 49. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Options Around Session Management  Sticky Session – Server Affinity  Must turn on J2EE Sessions  Easy setup - Works great  Must have some tolerance for errors on a failover  Needs in memory session replication to get seamless failover, however session failover has limitations and is not recommended by Adobe CF team  Client Scope  Setup client scope to be stored in database  Great solution for seamless failover  Great solution for round robin load balancing  Need to probably write your own purge routine to best control timing of the purges and to control locking  Distributed Caching – EHCache  Great solution similar to Client Scope just different mechanism  Can take the work off your database  Needs some expertise to setup and maintain  Check out the EHCache Session from CFSummit 2015 about some great new features  Custom Solution  Nothing to stop you from writing your own solution into the database, shared file system etc
  • 50. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hardware LB vs Software LB  Hardware LB  is the most common on scalable architectures  Network Probe determines outage  Also supports HTTP probe which can call a CF page to determine database health etc  Software LB offers low cost option to seamlessly take out peers from the pool  Tomcat Connector Load Balancing  HAProxy 55
  • 51. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Demo Application Failover  What we will see in the demo  Create 3 peers that are load balanced with worker.properies settings  Create Load on Web server(s)  Application is setup to use Client scope for user information  Client scope is defined to go to the database  Gracefully take server out of pool using Tomcat Connector admin  Restart IIS website to bring in new connector settings  Watch peers pick up traffic  Look to see of server threw any errors  Place server back into pool  Restart IIS website to bring in pool changes made with Tomcat connector admin  Peers pick up traffic
  • 52. © 2015 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Questions

Editor's Notes

  1. http://www.slideshare.net/ColdFusionConference/2014-cf-summitclustering
  2. Introduction, I love to work on setting up environment and that is all about me. Today, we use a lot web application and ColdFusion gives you more flexibility to build these applications easily. Lot of users are running mission critical applications with zero downtime and in case application goes down, they might lose the revenue. How to avoid those outages and create more robust architecture and provide security. To achieve this there is highly used standard knows as Multi-tier architecture.
  3. Today, we use a lot web application and ColdFusion gives you more flexibility to build these applications easily. Lot of users are running mission critical applications with zero downtime and in case application goes down, they might lose the revenue. How to avoid those outages and create more robust infrastructure. To achieve this there is highly used standard knows as Multi-tier architecture. When we talk about Multi-tier architecture so the question is can we achieve this using ColdFusion? Answer is YES However is it easy to setup distributed environment using ColdFusion? Yes
  4. In this architecture diagram, we have a web server in a separate machine and Application server(ColdFusion) in a separate server. To be able to communicate between ColdFusion and webserver, we need to create connector. Connector is a bridge which routes the request from Webserver to ColdFusion. However this is just one server, it has be multiple webserver and multiple Application server, so there is no single point of failure.
  5. AJP protocol works in the same way as HTTP protocol however it allow Tomcat to communicate with Webserver.
  6. Let me summarize what we have went through, how to setup distributed environment using single server and using cluster, also that is easily achieved by ColdFusion. By using these simple techniques, we can provide high availability to Mission critical application using ColdFusion that can not only help you grow your business and make our end user happy.