SlideShare a Scribd company logo
How to make bullet proof applications
   BBA in ISYS & Mgmt, Minor CS UND
   ImageTrend, Inc. 4+ years
    ◦ Currently: Lead Developer
   cf.Objective() attendee 5 years
   MAX 2008 (San Francisco) Attendee
   Contact:
    ◦ twitter: tedsteinmann
    ◦ tedsteinmann@gmail.com
   BS Computer Science, University of
    Minnesota, 2005
   ImageTrend, 5+ years
    ◦ Currently: Application Architect
   cf.Objective() attendee 4 years
   Contact:
    ◦ twitter: timlmeyer
    ◦ tim.l.meyer@gmail.com
Architecting for scalability in cf
   Framework Sale
   Buy my blog
   Group Think
   Miracle Drug
   Explanations
   Solutions
   Suggestions
   Demos
   The Big Idea
   Concerns
   Considerations
   Challenges
   Solutions
   Additional Considerations
 We want to make a website…
 We’re going to call it Spacebook…
 We’re going to be millionaires…*




           * If we don’t get sued by these guys
 Performance
 Uptime
 Availability
 Failover
    ◦ Accidents
    ◦ Maintenance
    ◦ Uncontrollable events
                              s##t happens
“Okay, let me tell you the
                                    difference between
                                  Facebook and everyone
                                else, we don't crash EVER!
   Scalability                 if those servers are down
                                for even a day, our entire
    ◦ Popularity problems:       reputation is irreversibly
                                        destroyed! “
      Increased traffic/load
      Hardware limitations
      Complexity
   Things we know
    ◦ Redundancy
    ◦ Routing
    ◦ Replication
   Proven methods/approaches
    ◦ Server Clustering
    ◦ Request Routing
    ◦ Replication/Mirroring
    ◦ Process Delegation
    ◦ Memory Management
Architecting for scalability in cf
   Clustering
    ◦ High-availability
      Failover
      Redundancy
    ◦ Load Balancing
   Request Routing
    ◦ Routing Rules
    ◦ Server Farms
    ◦ Load Balancing
    ◦ Programmatic failover
    ◦ Asset Caching
   Clustering & Routing
   Replication/Mirroring
   Process Delegation
    ◦ Asynchronous task completion
    ◦ Work queues
   Memory

    ◦ Scale Out
      Many small CF instances

    ◦ Scale Up
      Fewer large instances/servers
Architecting for scalability in cf
Architecting for scalability in cf
   Persistence of State
   Persistence of Data
   Configuration
◦ Persistence of State
   ◦ Session Management
      Browser Session & Server session
      Session/logged in
      Replication / Sticky Sessions
      Client vs. Session
   Persistence of Data
    ◦ Variables
    ◦ File system
    ◦ Database
   Persistence of Data - Variables
    ◦ CGI scope
      Cannot rely on web servers or proxy servers to
       set them consistently
      Cannot set CGI variables
    ◦ Session scope
    ◦ Client scope
   Persistence of Data – File System
    ◦ Multiple copies of your application code
       Code promotion / Release
    ◦ Management of user generated content
   Persistence of Data - Database
    ◦ Identifiers
      Identities/auto incremented primary keys
    ◦ Release
      New data structure
      Structure change/removal
   Configuration
    ◦ Will need to take place in/on:
      Every location
      Every server
      Every environment
        Dev, alpha, beta, testing, prod, etc.
Architecting for scalability in cf
Challenge: Persistence of State




        Make it Easier to Change - Session Façade
session.cfc:




   usage:
Challenge: Persistence of State




   Session/Client Data Management
    ◦ Database
    ◦ Client Scope as Session Scope
    ◦ Caching Servers
   Session/Client Persistence
    ◦ Cookies
    ◦ URL Token Based
Challenge: Persistence of Data - Variables




                   Don’t be a dope
   Use Façades   …wrap you scopes!
    ◦ CGI
    ◦ Session
    ◦ Client
Challenge: Persistence of Data – File system




   File System Design Strategies
    ◦ Database files
    ◦ Network shared file system
    ◦ Automatic replication of files
   Automate code deployments
    ◦ ANT, .bat, etc.
Challenge: Persistence of Data – Database




   Database Design Strategies
    ◦ Identifiers
      GUIDS
      Ranges
      Clustered primary keys
        Server name/location/identifier
      Roll your own
    ◦ Release
      Backwards compatibility
      Location specific updates
Challenge: Configuration




   Centralized Automatic configuration
    ◦   CFAdmin API
    ◦   XML config files
    ◦   Dynamic file paths
    ◦   Datasource configuration
   Globalization
    ◦ Time zones
    ◦ Multiple Languages
   Caching
    ◦ Distributed cache stores (ehcache, memcached)
   Database Role Segmentation
    ◦ One or many databases for reads / one for writes
      at each location
   Verification - Will my application really scale?
    ◦ Load Testing
    ◦ Failover Testing
    ◦ Can I seamlessly add to the hardware?
   Roll your own clustering/deployment
    ◦ JBOSS
    ◦ Tomcat
   ColdFusion:
    ◦   Administrator API
    ◦   Environment Configuration
    ◦   CF design patterns (sessions)
    ◦   Managing the client state
    ◦   Configuring and using session variables:
    ◦   JVM Memory Management
    ◦   JRUN Configuring Individual JVM Settings
    ◦   JRUN Clustering
    ◦   ColdFusion 9 on JBOSS
    ◦   ColdFusion Clustering
    ◦   Enabling clustering for load balancing and failover
    ◦   House of Fusion
    ◦   Database Your Files (Tim’s Presentation from TCCFUG)
   ARR:
    ◦ IIS Application Request Routing
    ◦ Using the Application Request Routing Module
    ◦ ARR without sea leg (setting up ARR to work locally)
   SQL
    ◦ Replication
    ◦ Mirroring
    ◦ SQL Mirroring in CF
   Scalability
    ◦ HighScalability.com
   Other:
    ◦ The Social Network
    ◦ CFSelenium
    ◦ MXUnit

More Related Content

PDF
Developing, deploying and monitoring Java applications using Google App Engine
PPTX
Virtual san pricing and packaging deck
PPTX
Orlando DNN Usergroup Pres 12/06/11
PPTX
Hyper-V Dynamic Memory in Depth
PPTX
South jersey sql virtualization
PPTX
DBA Fundamentals VC
PPTX
Sql saturday dc vm ware
PPTX
Steve marx-sic-2011
Developing, deploying and monitoring Java applications using Google App Engine
Virtual san pricing and packaging deck
Orlando DNN Usergroup Pres 12/06/11
Hyper-V Dynamic Memory in Depth
South jersey sql virtualization
DBA Fundamentals VC
Sql saturday dc vm ware
Steve marx-sic-2011

What's hot (20)

PPT
Virtualization Manager 5.0 – Now with Hyper-V Support!
PDF
NVMe over Fabric
PDF
San Francisco Cassadnra Meetup - March 2014: I/O Performance tuning on AWS fo...
PPTX
Introducing Xen Server
PDF
Cassandra Day SV 2014: Designing Commodity Storage in Apache Cassandra
PDF
针对iPad平台的高性能网站架构
PPTX
Get Your GeekOn with Ron - Session One: Designing your VDI Servers
PDF
Xen Virtualization 2008
PDF
CaSSanDra: An SSD Boosted Key-Value Store
PPTX
Building a Better Workstation
PDF
Why does my choice of storage matter with cassandra?
PPTX
San presentation nov 2012 central pa
PDF
Eric Moreau - Samedi SQL - Backup dans Azure et BD hybrides
PDF
How to build a state-of-the-art rails cluster
PDF
Micron vPAK 2pp Final no Bleed_TD03
PPTX
Move to azure
PPT
Orient db
PDF
Rails in the Cloud
KEY
Kabir Khan on AS6 at JBUG.be
PDF
Samedi SQL Québec - Database Backup & copy to Azure par Eric Moreau
Virtualization Manager 5.0 – Now with Hyper-V Support!
NVMe over Fabric
San Francisco Cassadnra Meetup - March 2014: I/O Performance tuning on AWS fo...
Introducing Xen Server
Cassandra Day SV 2014: Designing Commodity Storage in Apache Cassandra
针对iPad平台的高性能网站架构
Get Your GeekOn with Ron - Session One: Designing your VDI Servers
Xen Virtualization 2008
CaSSanDra: An SSD Boosted Key-Value Store
Building a Better Workstation
Why does my choice of storage matter with cassandra?
San presentation nov 2012 central pa
Eric Moreau - Samedi SQL - Backup dans Azure et BD hybrides
How to build a state-of-the-art rails cluster
Micron vPAK 2pp Final no Bleed_TD03
Move to azure
Orient db
Rails in the Cloud
Kabir Khan on AS6 at JBUG.be
Samedi SQL Québec - Database Backup & copy to Azure par Eric Moreau
Ad

Similar to Architecting for scalability in cf (20)

PPTX
Scaling your website
PPTX
L21 scalability
PPS
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
PDF
L20 Scalability
PDF
High Scalability Toronto: Meetup #2
PDF
Scalarium and CouchDB
PPTX
Application architecture for cloud
PPTX
Scaling High Traffic Web Applications
PPTX
Scaling a High Traffic Web Application: Our Journey from Java to PHP
PPTX
Couchbase presentation
KEY
Web frameworks don't matter
PPT
Top 30 Scalability Mistakes
PPTX
Scaling Systems: Architectures that Grow
PPS
Scalable Web Arch
PPS
Scalable Web Architectures - Common Patterns & Approaches
PPT
Apache Con 2008 Top 10 Mistakes
PPT
Large-scale projects development (scaling LAMP)
PPT
FOWA Scaling The Lamp Stack Workshop
PPT
Top 10 Scalability Mistakes
PPS
Web20expo Scalable Web Arch
Scaling your website
L21 scalability
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
L20 Scalability
High Scalability Toronto: Meetup #2
Scalarium and CouchDB
Application architecture for cloud
Scaling High Traffic Web Applications
Scaling a High Traffic Web Application: Our Journey from Java to PHP
Couchbase presentation
Web frameworks don't matter
Top 30 Scalability Mistakes
Scaling Systems: Architectures that Grow
Scalable Web Arch
Scalable Web Architectures - Common Patterns & Approaches
Apache Con 2008 Top 10 Mistakes
Large-scale projects development (scaling LAMP)
FOWA Scaling The Lamp Stack Workshop
Top 10 Scalability Mistakes
Web20expo Scalable Web Arch
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
cuic standard and advanced reporting.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
cuic standard and advanced reporting.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Programs and apps: productivity, graphics, security and other tools

Architecting for scalability in cf

  • 1. How to make bullet proof applications
  • 2. BBA in ISYS & Mgmt, Minor CS UND  ImageTrend, Inc. 4+ years ◦ Currently: Lead Developer  cf.Objective() attendee 5 years  MAX 2008 (San Francisco) Attendee  Contact: ◦ twitter: tedsteinmann ◦ tedsteinmann@gmail.com
  • 3. BS Computer Science, University of Minnesota, 2005  ImageTrend, 5+ years ◦ Currently: Application Architect  cf.Objective() attendee 4 years  Contact: ◦ twitter: timlmeyer ◦ tim.l.meyer@gmail.com
  • 5. Framework Sale  Buy my blog  Group Think  Miracle Drug
  • 6. Explanations  Solutions  Suggestions  Demos
  • 7. The Big Idea  Concerns  Considerations  Challenges  Solutions  Additional Considerations
  • 8.  We want to make a website…  We’re going to call it Spacebook…  We’re going to be millionaires…* * If we don’t get sued by these guys
  • 9.  Performance  Uptime  Availability  Failover ◦ Accidents ◦ Maintenance ◦ Uncontrollable events s##t happens
  • 10. “Okay, let me tell you the difference between Facebook and everyone else, we don't crash EVER!  Scalability if those servers are down for even a day, our entire ◦ Popularity problems: reputation is irreversibly destroyed! “  Increased traffic/load  Hardware limitations  Complexity
  • 11. Things we know ◦ Redundancy ◦ Routing ◦ Replication
  • 12. Proven methods/approaches ◦ Server Clustering ◦ Request Routing ◦ Replication/Mirroring ◦ Process Delegation ◦ Memory Management
  • 14. Clustering ◦ High-availability  Failover  Redundancy ◦ Load Balancing
  • 15. Request Routing ◦ Routing Rules ◦ Server Farms ◦ Load Balancing ◦ Programmatic failover ◦ Asset Caching
  • 16. Clustering & Routing
  • 17. Replication/Mirroring
  • 18. Process Delegation ◦ Asynchronous task completion ◦ Work queues
  • 19. Memory ◦ Scale Out  Many small CF instances ◦ Scale Up  Fewer large instances/servers
  • 22. Persistence of State  Persistence of Data  Configuration
  • 23. ◦ Persistence of State ◦ Session Management  Browser Session & Server session  Session/logged in  Replication / Sticky Sessions  Client vs. Session
  • 24. Persistence of Data ◦ Variables ◦ File system ◦ Database
  • 25. Persistence of Data - Variables ◦ CGI scope  Cannot rely on web servers or proxy servers to set them consistently  Cannot set CGI variables ◦ Session scope ◦ Client scope
  • 26. Persistence of Data – File System ◦ Multiple copies of your application code  Code promotion / Release ◦ Management of user generated content
  • 27. Persistence of Data - Database ◦ Identifiers  Identities/auto incremented primary keys ◦ Release  New data structure  Structure change/removal
  • 28. Configuration ◦ Will need to take place in/on:  Every location  Every server  Every environment  Dev, alpha, beta, testing, prod, etc.
  • 30. Challenge: Persistence of State  Make it Easier to Change - Session Façade session.cfc: usage:
  • 31. Challenge: Persistence of State  Session/Client Data Management ◦ Database ◦ Client Scope as Session Scope ◦ Caching Servers  Session/Client Persistence ◦ Cookies ◦ URL Token Based
  • 32. Challenge: Persistence of Data - Variables Don’t be a dope  Use Façades …wrap you scopes! ◦ CGI ◦ Session ◦ Client
  • 33. Challenge: Persistence of Data – File system  File System Design Strategies ◦ Database files ◦ Network shared file system ◦ Automatic replication of files  Automate code deployments ◦ ANT, .bat, etc.
  • 34. Challenge: Persistence of Data – Database  Database Design Strategies ◦ Identifiers  GUIDS  Ranges  Clustered primary keys  Server name/location/identifier  Roll your own ◦ Release  Backwards compatibility  Location specific updates
  • 35. Challenge: Configuration  Centralized Automatic configuration ◦ CFAdmin API ◦ XML config files ◦ Dynamic file paths ◦ Datasource configuration
  • 36. Globalization ◦ Time zones ◦ Multiple Languages  Caching ◦ Distributed cache stores (ehcache, memcached)  Database Role Segmentation ◦ One or many databases for reads / one for writes at each location
  • 37. Verification - Will my application really scale? ◦ Load Testing ◦ Failover Testing ◦ Can I seamlessly add to the hardware?  Roll your own clustering/deployment ◦ JBOSS ◦ Tomcat
  • 38. ColdFusion: ◦ Administrator API ◦ Environment Configuration ◦ CF design patterns (sessions) ◦ Managing the client state ◦ Configuring and using session variables: ◦ JVM Memory Management ◦ JRUN Configuring Individual JVM Settings ◦ JRUN Clustering ◦ ColdFusion 9 on JBOSS ◦ ColdFusion Clustering ◦ Enabling clustering for load balancing and failover ◦ House of Fusion ◦ Database Your Files (Tim’s Presentation from TCCFUG)
  • 39. ARR: ◦ IIS Application Request Routing ◦ Using the Application Request Routing Module ◦ ARR without sea leg (setting up ARR to work locally)  SQL ◦ Replication ◦ Mirroring ◦ SQL Mirroring in CF  Scalability ◦ HighScalability.com  Other: ◦ The Social Network ◦ CFSelenium ◦ MXUnit