moving to the cloud: aws, zend, rightscale

21
Moving to Amazon Web Services And keeping it under control with RightScale

Upload: mmoline

Post on 10-Jun-2015

584 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Moving to the Cloud: AWS, Zend, RightScale

Moving to Amazon Web Services

And keeping it under control with RightScale

Page 2: Moving to the Cloud: AWS, Zend, RightScale
Page 3: Moving to the Cloud: AWS, Zend, RightScale

Who am I?

• Mark Moline (@polloboy)– Long time Internet developer:

research, software dev,publishing, event photography

– Pre WWW– PHP since v3

Page 4: Moving to the Cloud: AWS, Zend, RightScale

• 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

Page 5: Moving to the Cloud: AWS, Zend, RightScale

What will we talk about?

• Typical web application deployment architectures

• Challenges and problems• AWS / RightScale / Zend components• Our solution• Other considerations• Alternative Solutions

Page 6: Moving to the Cloud: AWS, Zend, RightScale

How do your applications grow?

• All-in-One

Apache

PHP

Session Files MySQL DB

Page 7: Moving to the Cloud: AWS, Zend, RightScale

How do your applications grow?

• Separate DB Server

Apache

PHP

Session Files

MySQL Server

Page 8: Moving to the Cloud: AWS, Zend, RightScale

How do your applications grow?

• Typical multi-server load balanced app

MySQL Server

Apache

PHP

Session Files

Apache

PHP

Session Files

Load Balancer

Page 9: Moving to the Cloud: AWS, Zend, RightScale

Challenges

• Main Issues– Sessions• Scale up and down

– DB Scaling• Replication, backups, failover

• Other Areas– HA Sessions– HA DB– Caching

Page 10: Moving to the Cloud: AWS, Zend, RightScale

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

Page 11: Moving to the Cloud: AWS, Zend, RightScale

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…”

Page 12: Moving to the Cloud: AWS, Zend, RightScale

• 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

Page 13: Moving to the Cloud: AWS, Zend, RightScale

• 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

Page 14: Moving to the Cloud: AWS, Zend, RightScale

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.

Page 15: Moving to the Cloud: AWS, Zend, RightScale

• 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

Page 16: Moving to the Cloud: AWS, Zend, RightScale

How our little big system grew

Page 17: Moving to the Cloud: AWS, Zend, RightScale

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

Page 18: Moving to the Cloud: AWS, Zend, RightScale

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

Page 19: Moving to the Cloud: AWS, Zend, RightScale

Alternatives?

• Cloud:– Rackspace, SoftLayer, Eucalyptus,

CloudStack, more every day

• Management:– Eucalyptus– Scalr.net– Enstratus

• App Server– Roll your own…

Page 20: Moving to the Cloud: AWS, Zend, RightScale

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

Page 21: Moving to the Cloud: AWS, Zend, RightScale

Q&A

• Questions?

• Mark Moline @[email protected]