Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Making Your ColdFusion Apps Highly Available

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for Brian Klaas Brian Klaas
September 30, 2012

Making Your ColdFusion Apps Highly Available

What happens when you move your web application from a single server to a cluster of servers? What do you need to think about in order to achieve 99.99% (or higher) uptime? This presentation, given at NCDevCon 2012, discusses those issues and gives an overview of Amazon EC2 as a possible deployment solution for your high-availability web app cluster.

Avatar for Brian Klaas

Brian Klaas

September 30, 2012
Tweet

More Decks by Brian Klaas

Other Decks in Technology

Transcript

  1. $

  2. CF + IIS CF + IIS CF + IIS Load

    Balancer File Share Database Static Asset Domain
  3. <cfset pathToFiles = expandPath(" /fileShareDirectory/uploads" /> <cffile action = "upload"

    fileField = "profileImage" destination = "#pathToFiles#" />
  4. 1. Set up mapped directory to the le share at

    the OS level. 2. Make sure CF has permission to access the share. Two Tips
  5. <cfset var inetAddressObj = createObject("java", "java.net.InetAddress") /> <cfset globalVars.machineName =

    inetAddressObj.localhost.getCanonicalHostName() /> Add to App Startup Code
  6. (Very) Basic Monitoring 1. Loop through list of servers to

    check 2. Make <cfhttp> call to a “heartbeat” event on each 3. Result = error, send an email/SMS alert
  7. CF + IIS CF + IIS CF + IIS Load

    Balancer File Share Static Asset Domain Database Master Database Slave
  8. CF + IIS CF + IIS CF + IIS Load

    Balancer File Share Database Static Asset Domain
  9. CF + IIS CF + IIS CF + IIS Load

    Balancer File Share Static Asset Domain Database Master Database Slave
  10. CF + IIS CF + IIS CF + IIS Load

    Balancer Static Asset Domain Database Master Database Slave File Share 1 File Share 2
  11. CF + IIS CF + IIS CF + IIS Load

    Balancer Database Master Database Slave File Share 1 File Share 2 Static Asset 1 Static Asset 2
  12. CF + IIS CF + IIS CF + IIS Load

    Balancer Database Master Database Slave File Share 1 File Share 2 Scheduled Task Server Static Asset 1 Static Asset 2
  13. Dev

  14. CF + IIS CF + IIS CF + IIS Load

    Balancer Database Master Database Slave File Share 1 File Share 2 Scheduled Task Server Load Balancer Static Asset 1 Static Asset 2
  15. Node 1 Node 2 Load Balancer Load Balancer CF +

    IIS CF + IIS CF + IIS Database Master Database Slave File Share 2 File Share 1 Static Asset Domain
  16. EC2

  17. Amazon RDS Databases: Your own MySQL Oracle MS SQL Server

    NoSQL DB MongoDB Cassandra CouchDB Riak Redis AZ Dynamo DB AZ Simple DB EC2 + EBS
  18. ELB

  19. EC2 + AMI EC2 + AMI EC2 + AMI ELB

    DB Master EC2 + AMI DB Slave EC2 + AMI Task EC2 + AMI EBS EBS EBS User Content S3 Static Asset S3 EBS EBS EBS EBS EBS
  20. Use multiple availability zones. Region = data center around the

    globe Availability zone = segment of a data center
  21. Resources ▪ Amazon AWS aws.amazon.com ▪ Amazon Elastic Compute Cloud

    aws.amazon.com/ec2/ ▪ Amazon Machine Images aws.amazon.com/amis/ ▪ Amazon Elastic Block Storage aws.amazon.com/ebs/ ▪ Amazon Simple Storage Service (S3) aws.amazon.com/s3/
  22. Resources ▪ Amazon Relational Database Service aws.amazon.com/rds/ ▪ Amazon Elastic

    Load Balancing aws.amazon.com/elasticloadbalancing/ ▪ Amazon Elastic Beanstalk (Autoscaling) aws.amazon.com/elasticbeanstalk/ ▪ Amazon ElastiCache aws.amazon.com/elasticache/ ▪ Amazon DynamoDB (NoSQL Service) aws.amazon.com/dynamodb/
  23. Resources ▪ Amazon Route 53 (DNS Service) aws.amazon.com/route53/ ▪ Amazon

    Autoscale aws.amazon.com/autoscale/ ▪ The Official Word on CF10 Licensing Changes blogs.coldfusion.com/post.cfm/coldfusion-10-eula ▪ Jelastic (PaaS Vendor that Supports ColdFusion) jelastic.com ▪ Net ix’s Chaos Monkey github.com/Net ix/SimianArmy
  24. Resources ▪ Apache ANT ant.apache.org ▪ Puppet puppetlabs.com ▪ Chef

    www.opscode.com/chef/ ▪ FusionReactor www.fusion-reactor.com ▪ Database Sharding www.codefutures.com/database-sharding/