moving to the cloud: aws, zend, rightscale
Post on 10-Jun-2015
584 Views
Preview:
TRANSCRIPT
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
MySQL Server
Apache
PHP
Session Files
Apache
PHP
Session Files
Load Balancer
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
PHP
Session Files MySQL DB
SVN
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…”
• 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,
http://aws.amazon.com/products
• 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.
• 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
Zend Server Cluster Manager
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 @polloboymark.moline@gmail.com
top related