a crash course on aws for app developers
DESCRIPTION
Talk give by Flux7's CEO, Aater Suleman, at the Bleeding Edge Web Meetup, Austin on May 28th 2014. The talk covers the following: 1. Quick introduction to Cloud Computing 2. Why AWS? How a traditional web-app can be run on AWS - the services and changes needed 3. A walk-through of AWS services 4. Web Developer Productivity 5. Lessons LearntTRANSCRIPT
Preamble: Intro to Cloud Computing
Presented by:Aater Suleman, PhD
Bleeding Edge Web Meetup, Austin: May 28th, 2014
Cloud Computing has turned computing into a Utility.
Changes to Computer Thinking - Stephen Fry Explains Cloud Computing -
A Must Watch!
Pay-per-use Dynamically scale processing, storage and
memory
No more guessing work on the hardware
requirements
Compliance Security Reliability Scalability
is as a package available to any business - irrespective of its type and size!
“Friends don't let their friends build data centers”-Charles Phillips, CEO of Infor
AWS Summit 2014
Largest of the providers
Most streamlined interface
Most mature automation
Lots of features
Amazon Web Services
Photo by Cacakian | CC BY
A Crash Course on AWS for App Developers
Who am I?Aater Suleman
Geek, Architect, Developer, Ops ⇒ DevOps Co-founder & CEO Flux7 Part-time UT Austin Professor
Flux7: Cloud and DevOps Solutions
Cloud and Devops for Web teamsEnterprise DevOps management
Clients:
★ Front-end HTML/JS developers★ Backend developers★ Operations folks ★ DevOps★ Managers/executives
Quick Poll
HOW MANY?
★ Enterprise ( > 1B in cap )★ Mid-tier ★ SMBs
Quick Poll
HOW MANY?
AWS (or any cloud) changes
How to architect?
How to develop?
How to manage?
Architecting for AWS
AWS Evolution in 3-steps
Sample Web-app
DB App Web
MemCache Varnish
Static storage DNS QueueNoSQL
DB
Worry List
DB backup
Assets backup
Uptime of Web
Uptime of App
Uptime of DB
Uptime of static hosting
Traffic spikes
DoS attacks
Security breaches
0. Get AWS servers and setup
DB App Web
MemCache Varnish
Static storage DNS QueueNoSQL
DB
DB backup
Assets backup
Uptime of Web
Uptime of App
Uptime of DB
Uptime of static hosting
Traffic spikes
DoS attacks
Security breaches
Worry List
1. Replace tiers with AWS Services
DB App Web
MemCache Varnish
Static storage DNS QueueNoSQL
DB
Queue
1. Replace tiers with AWS Services
DNS
App Web
DynamoDB SQS
RDS
Elasticache CloudFront
S3
Servers aka. Instances
Amazon EC2
AMIs aka. Images Volumes and Snapshots
Traditional DB as a service.
Amazon RDS
Fast
Geographically distributed
Ability to cache static and dynamic content
Amazon CloudFront
Caching layer (Think Varnish!)
In-memory caching tier for your application
Spin up with a single click and start using
Redis and Memcached are available
Amazon Elasticache
Object storage:
High Availability (99.99%)
High Durability (99.999999999%)
Fast
Amazon S3
Amazon DynamoDB
NoSQL DB as a service
Create a new Column-based NoSQL in minutes
Other Services
Route53 :
Amazon’s DNS servers
SNS :
For server-to-server and server-to-man communication
SQS :
On-demand queuing service
SWF :
Simple Workflow
DB backup
Assets backup
Uptime of Web
Uptime of App
Uptime of DB
Uptime of static hosting
Traffic spikes
DoS attacks
Security breaches
Worry List
Whether or not to replace a tier
What is the availability requirement?
Can i achieve the uptime using EC2 servers? Will it be cheaper?
Will I save in terms of code changes?
2. Secure
DNS
App Web
DynamoDB SQS
RDS
Elasticache CloudFront
S3
Security Groups
Security Group
VPC
Security Services
2. Secure
DNS
App Web
DynamoDB SQS
RDS
ElasticacheCloudFront
S3
VPC
Subnet
Subnet
Subnet
Subnet
3. Leverage Elasticity
DNS
AppWeb
DynamoDB SQS
RDS
ElasticacheCloudFront
S3
VPC
Subnet
Subnet
Subnet
Subnet
AppApp WebWeb
Auto-scaling Groups
Scaling Services
Elastic BeanStalk OpsWorks
Separate stateful services from stateless services
Do not rely on server IP addresses being fixed
Bake your server’s images
Auto-scaling Checklist
DB backup
Assets backup
Uptime of Web
Uptime of App
Uptime of DB
Uptime static hosting
Traffic spikes
DoS attacks
Security breaches
Worry List
DNS
AppWeb
DynamoDB SQS
RDS
ElasticacheCloudFront
S3
VPC
Subnet
Subnet
Subnet
Subnet
AppApp WebWeb
How to code?
Cattle, not pets!
Have numbers assigned
Are usually identical
Replaced when not in good health
You need more, you buy more
Has a personalized name
Unique, Special and Cared for
Taken care when ill
Src: Gavin McCance from CERN
Servers are cattle, don’t use IP addresses and host name in code
Use an existing service whenever possible
Don’t mix stateful and stateless services
Script application deployment or use configuration management
Setup local developer environments
Five Take Aways
How to code?
Developer Local Test QA Production
Least expensive but most executed
Most expensive but least executed
AppWeb
DB
LogStashMem
$
HTTP
SSH
Virtualbox VM
App Code and Logs
Laptop
devenv.sh for interacting with
the setup
Docker Containers
Redis
Src: Using Docker to Improve Web Developer Productivity
How to manage?
How to manage?
How to deploy code to an auto-scaling group?
How to configure the servers in this dynamic environment?
How to create/re-create environments on failure?
How to deploy code to an auto scaling group ?
Don’t deploy new code to a server
Make a new server and replace the old one with it
Read More on the 6 deployment methods here
How do I manage and patch my servers?
Don’t. Create deployment scripts and just create a new image
How to create/re-create environments on failure?
Automate the process of creating the entire environment using AWS CloudFormation templates.
Create a new environment with one click.
Other Lessons
Configuration management
Setup CI/CD
Thank You!
Twitter: @Flux7Labs
Website: www.flux7.com