Moving to Amazon Web
      Services
And keeping it under control with
          RightScale
Who am I?
• Mark Moline (@polloboy)
  – Long time Internet developer:
    research, software dev,
    publishing, event photography
  – Pre WWW
  – PHP since v3
• Generate leads for online and traditional colleges and
  universities
• Two primary public-facing sites:
   – AchieveYourCareer.com
   – FindYourDegree.com
• Numerous B2B portals
• Custom Matching Algorithms to
  find best fit for students
• Targeted high-volume campaigns
What will we talk about?
• Typical web application deployment
  architectures
• Challenges and problems
• AWS / RightScale / Zend components
• Our solution
• Other considerations
• Alternative Solutions
How do your applications grow?
• All-in-One

                         Apache

                           PHP

               Session Files     MySQL DB
How do your applications grow?
• Separate DB Server

                  Apache

                    PHP

                Session Files




                MySQL Server
How do your applications grow?
• Typical multi-server load balanced app
                  Load Balancer




                  MySQL Server
Challenges
• Main Issues
  – Sessions
    • Scale up and down
  – DB Scaling
    • Replication, backups, failover
• Other Areas
  – HA Sessions
  – HA DB
  – Caching
The Old Way
•   Organically grown, single monolithic server.
•   Entire app on one box.
•   In-house SVN for source code
•   S3 for backups

                   Apache             SVN
                     PHP
          Session Files   MySQL DB
                                       S3
Problems
• No room for traffic bursts
• FRAGILE – Don’t want to upgrade X
  because it may break Y
• Single point of failure – could bring
  business down for hours or possibly days
• Encouraged manual hacking instead of
  best practices. “It’s OK, I’ll just edit this file
  on the live server…”
http://aws.amazon.com/products

• Servers: EC2
   – Various sizes (and prices) from 613MB + 2EC2 Compute Units
     to 68.4GB + 26EC2 Compute Units
   – Compute unit approx 1.7GHz Xeon or 1.2GHz Opteron ca 2007
• Storage: S3 and EBS
   – S3: static files, can link to Cloud Front for CDN, very high
     availability and reliability
   – EBS: disk storage for your EC2 instances
• Database: RDS
   –   Cloud version of MySQL – works but not very tuneable
   –   Great for quick tests and very standard applications
   –   Usually better to put your own MySQL installation on a dedicated EC2 instance
   –   Plenty of others including NoSQL, Dynamo DB, Key/Value store…
• Load Balancing, DNS, Queueing, Messaging, workflows,
• RightScale manages your AWS (or other
  cloud) instances for you.
• Monitoring and relaunch on crash
• Scale up/down based on defined metrics
• Pre-built server templates ready for use or
  customization
RightScale Server Templates and Deployments

• Start with AWS EC2
  instance
• Run a series of shell
  scripts to install and
  build needed services
• Everything scripted from
  standard inputs
• Easy to customize and
  extend. Essential.
• Revision Control with
  commit and rollback for
  scripts and templates
  and deployments.
Zend Server Cluster Manager

• Pre-configured Zend PHP architecture
• Based on industry best practices
• Auto-scaling based on system and
  application load metrics, supported by
  load balancing
• PHP session clustering for high
  availability
• Redundant database with snapshots,
  failover, and recovery
• Caching
• Code tracing / debugging
• In Zend Server 5.6 also get deployment
How our little big system grew
Benefits
• No more single point of (disastrous) failure
• MySQL master/slave replication and EBS
  Snapshot backups “just work”
• Better reliability because everything is
  scripted. No more manual build processes
• Easy to clone and test new configs
• Testing environment identical to production
• Flexibility to change architecture as needed
• Increased capacity, of course
Other Considerations
• Test your failover strategy – Chaos
  Monkey
• Document your process – in-house wiki
• Move source out of house
• Leverage Amazon Cloud Front for CDN
• Keep S3 secure – keys and ACLs
• Buy reserved instances as soon as
  possible
• Keep “warm” spare in a different cloud
Alternatives?
• Cloud:
  – Rackspace, SoftLayer, Eucalyptus,
    CloudStack, more every day
• Management:
  – Eucalyptus
  – Scalr.net
  – Enstratus
• App Server
  – Roll your own…
Roll Your Own?
• Host Your Web Site in the Cloud – Jeff Barr
• Programming Amazon Web Services – James Murty
• Programming Amazon EC2 – Jurg van Vliet, Flavia Paganelli
Q&A
• Questions?

• Mark Moline
  @polloboy
  mark.moline@gmail.com

Moving to the Cloud: AWS, Zend, RightScale

  • 1.
    Moving to AmazonWeb Services And keeping it under control with RightScale
  • 3.
    Who am I? •Mark Moline (@polloboy) – Long time Internet developer: research, software dev, publishing, event photography – Pre WWW – PHP since v3
  • 4.
    • Generate leadsfor online and traditional colleges and universities • Two primary public-facing sites: – AchieveYourCareer.com – FindYourDegree.com • Numerous B2B portals • Custom Matching Algorithms to find best fit for students • Targeted high-volume campaigns
  • 5.
    What will wetalk about? • Typical web application deployment architectures • Challenges and problems • AWS / RightScale / Zend components • Our solution • Other considerations • Alternative Solutions
  • 6.
    How do yourapplications grow? • All-in-One Apache PHP Session Files MySQL DB
  • 7.
    How do yourapplications grow? • Separate DB Server Apache PHP Session Files MySQL Server
  • 8.
    How do yourapplications grow? • Typical multi-server load balanced app Load Balancer MySQL Server
  • 9.
    Challenges • Main Issues – Sessions • Scale up and down – DB Scaling • Replication, backups, failover • Other Areas – HA Sessions – HA DB – Caching
  • 10.
    The Old Way • Organically grown, single monolithic server. • Entire app on one box. • In-house SVN for source code • S3 for backups Apache SVN PHP Session Files MySQL DB S3
  • 11.
    Problems • No roomfor traffic bursts • FRAGILE – Don’t want to upgrade X because it may break Y • Single point of failure – could bring business down for hours or possibly days • Encouraged manual hacking instead of best practices. “It’s OK, I’ll just edit this file on the live server…”
  • 12.
    http://aws.amazon.com/products • Servers: EC2 – Various sizes (and prices) from 613MB + 2EC2 Compute Units to 68.4GB + 26EC2 Compute Units – Compute unit approx 1.7GHz Xeon or 1.2GHz Opteron ca 2007 • Storage: S3 and EBS – S3: static files, can link to Cloud Front for CDN, very high availability and reliability – EBS: disk storage for your EC2 instances • Database: RDS – Cloud version of MySQL – works but not very tuneable – Great for quick tests and very standard applications – Usually better to put your own MySQL installation on a dedicated EC2 instance – Plenty of others including NoSQL, Dynamo DB, Key/Value store… • Load Balancing, DNS, Queueing, Messaging, workflows,
  • 13.
    • RightScale managesyour AWS (or other cloud) instances for you. • Monitoring and relaunch on crash • Scale up/down based on defined metrics • Pre-built server templates ready for use or customization
  • 14.
    RightScale Server Templatesand Deployments • Start with AWS EC2 instance • Run a series of shell scripts to install and build needed services • Everything scripted from standard inputs • Easy to customize and extend. Essential. • Revision Control with commit and rollback for scripts and templates and deployments.
  • 15.
    Zend Server ClusterManager • Pre-configured Zend PHP architecture • Based on industry best practices • Auto-scaling based on system and application load metrics, supported by load balancing • PHP session clustering for high availability • Redundant database with snapshots, failover, and recovery • Caching • Code tracing / debugging • In Zend Server 5.6 also get deployment
  • 16.
    How our littlebig system grew
  • 17.
    Benefits • No moresingle point of (disastrous) failure • MySQL master/slave replication and EBS Snapshot backups “just work” • Better reliability because everything is scripted. No more manual build processes • Easy to clone and test new configs • Testing environment identical to production • Flexibility to change architecture as needed • Increased capacity, of course
  • 18.
    Other Considerations • Testyour failover strategy – Chaos Monkey • Document your process – in-house wiki • Move source out of house • Leverage Amazon Cloud Front for CDN • Keep S3 secure – keys and ACLs • Buy reserved instances as soon as possible • Keep “warm” spare in a different cloud
  • 19.
    Alternatives? • Cloud: – Rackspace, SoftLayer, Eucalyptus, CloudStack, more every day • Management: – Eucalyptus – Scalr.net – Enstratus • App Server – Roll your own…
  • 20.
    Roll Your Own? •Host Your Web Site in the Cloud – Jeff Barr • Programming Amazon Web Services – James Murty • Programming Amazon EC2 – Jurg van Vliet, Flavia Paganelli
  • 21.
    Q&A • Questions? • MarkMoline @polloboy mark.moline@gmail.com