85
Leveraging AWS for the lean development cycle

AWS for Start-ups - Leveraging AWS for the Lean Development Cycle

Embed Size (px)

Citation preview

Leveraging AWS for the lean

development cycle

What is the “lean development cycle”?

Fast

Flexible

Pivot

Iterate

Agility Code not documentation

MVP Sprint Working software

Continuous integration

Last ethical point

Just in time

Stand up meeting

Think big; act small

Fail fast; learn rapidly

Idea Product

Idea Product

Least friction

Highest quality

Idea Product

Idea Product

Shortest time

Highest accuracy

Idea Product

Idea Product

Failing fast when you need to

Idea Product

Product

Product

Idea Product

Product

Product Freedom to pivot if you have to

How?

How? use a platform built for iteration

A startup journey…

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

Idea You've got a great idea and need to

validate it with some marketing

1

Get

fast feedback

Get

a website

http://aws.amazon.com/cloudformation/aws-cloudformation-templates/

Get started with business apps in a click

Add a $30 template

Sit back

test & measure

1x free tier instance Zero cost

Marketing message Potential product features

Social interest

What to build Priorities Wish lists

Validate Define

AWS: 1x free tier instance Zero cost

Marketing message Potential product features

Social interest

What to build Priorities Wish lists

Validate Define

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

Deployment You got some interest, defined your MVP

and built it…

2

Launch on a

positive SLA

Launch on a

positive SLA

Start as you mean to go on

AWS lets you build ‘web-scale’ systems

Features may be lacking

but it needs to be up

and it should stay up

Managed ‘model’ architecture Scalability & availability from the start

Deliver simple things Deliver them well

Simplify operations Spend more time on your

application

Deploy Operate

AWS: Managed ‘model’ architecture Scalability & availability from the start

Deliver simple things Deliver them well

Simplify operations Spend more time on your

application

Deploy Operate

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

Customers People are using your product, lots of them

from all over the world

3

Scale out

Trigger auto-

scaling policy

as-create-auto-scaling-group MyGroup

--launch-configuration MyConfig

--availability-zones eu-west-1a

--min-size 4

--max-size 200

Auto-scaling Automatic re-sizing of compute clusters based upon demand

Instance counts

Cooldown

Trigger metrics

Tune the Elastic Beanstalk

Scale up

Vertical Scaling

From $0.02/hr

Basic unit of compute capacity

Range of CPU, memory & local disk options

Many instance types available, from micro through cluster

compute to SSD backed

Scale up with Elastic Compute Cloud (EC2)

Buy time with instance sizes

Offload

London

Paris

NY

Served from S3

/images/*

3

Served from EC2

*.php

2

Single CNAME

www.mysite.com

1

CloudFront

World-wide content

distribution network

Easily distribute content

to end users with low

latency, high data

transfer speeds, and no

commitments.

Without CloudFront

EC2 webservers/app servers loaded by user

requests

With CloudFront

Load of user requests pushed into

CloudFront, EC2 cluster can scale

down

Offload Scale Down

Res

po

nse

Tim

e

Serv

er L

oad

Res

po

nse

Tim

e

Serv

er

Load

Res

po

nse

Tim

e

Serv

er

Load

No CDN CDN for

Static

Content

CDN for

Static &

Dynamic

Content

Offload Scale Down

Add a CDN and go global

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

It breaks 3am in the morning, things go wrong

4

Technical debt

catches up with you

Technical debt

needs paying down

Review Optimize Refactor

Database backups

EBS snapshots

Volume sizes

Database performance

Instance sizes

Provisioned IOPS

NoSQL for data hot-spots

Caching strategies

Decoupling

Review Optimize Refactor

Database backups

EBS snapshots

Volume sizes

Database performance

Instance sizes

Provisioned IOPS

NoSQL for data hot-spots

Caching strategies

Decoupling

Ensure things aren’t ‘hitting the

sides’

Buy some time with sensible

tweaks

Pay down technical debt you’ve accrued

Review Optimize Refactor

Ensure things aren’t ‘hitting the

sides’

Buy some time with sensible

tweaks

Pay down technical debt you’ve accrued

Database backups

EBS snapshots

Volume sizes

Database performance

Instance sizes

Provisioned IOPS

NoSQL for data hot-spots

Caching strategies

Decoupling

Relational Database Service Database-as-a-Service

No need to install or manage database instances

Scalable and fault tolerant configurations

DynamoDB Provisioned throughput NoSQL database

Fast, predictable performance

Fully distributed, fault tolerant architecture

Use RDS for databases

Use DynamoDB for high performance key-

value DB

Amazon SQS

Processing

task/processing

trigger

Processing results

Amazon SQS Reliable, highly scalable, queue service

for storing messages as they travel

between instances

Task A

Task B

(Auto-scaling)

Task C

2

3

1

Simple Workflow Reliably coordinate processing steps

across applications

Integrate AWS and non-AWS resources

Manage distributed state in complex

systems

Push inter-process workflows into the cloud with SWF

Reliable message queuing without

additional software

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

Automation No-one wants to get up at 3am ever again

5

Compute

Storage

Security Scaling

Database

Networking Monitoring

Messaging

Workflow

DNS

Load Balancing

Backup CDN

Everything is programmable

Access everything via CLI, API or

Console

Achieve the highest levels of automation

sophistication with ease

Everything is programmable

Everything is programmable

Start thinking like this guy… …is doing this to

your system

Infrastructure as code

automate it so you don’t have to

1

2

3

4 5

6

Idea

Deployment

Customers

It breaks

Automation

Evolution

Evolution Operations are efficient so you have time

to iterate and innovate

6

Stay lean

keep testing what you are doing

Instrument everything, all of

the time

Inspect the whole distribution

e.g. service latency

Address the tail ‘the worst case’

Improve the overall picture

e.g. service latency

Put everything in logs so you can do something with it

1 instance for 100 hours =

100 instances for 1 hour

Put everything in logs so you can do something with it

Get smart

and keep teams small

Lean meets agile

Lean meets agile

while(true) {

if(change checked into SVN){

build & test

sleep 60

}

}

Lean meets agile

Automated testing

Continuous Integration

Infrastructure as code

Continuous Delivery Elastic Resources Pay as you go

11.6s

Mean time

between

deployments

(weekday)

1,079

Max number of

deployments in a

single hour

10,000

Mean number of

hosts

simultaneously

receiving a

deployment

30,000

Max number of

hosts

simultaneously

receiving a

deployment

Deployments at Amazon.com:

Idea Product

Idea Product

Least friction

Highest quality

Idea Product

Idea Product

AWS

Don’t take it from me…

…hear how a team of pros do it