why startups are still on aws

171
WHY STARTUPS ARE (STILL) ON AMAZON WEB SERVICES Danilo Poccia | Solutions Architect

Upload: amazon-web-services

Post on 08-May-2015

2.679 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Why Startups Are Still On AWS

WHY STARTUPS ARE (STILL)

ON AMAZON WEB SERVICES

Danilo Poccia | Solutions Architect

Page 2: Why Startups Are Still On AWS

Startups?

http://www.flickr.com/photos/klearchos/5857451393/

Page 3: Why Startups Are Still On AWS

« A startup is a human institution

designed to create a new

product or service under

conditions of extreme

uncertainty. »

Eric Ries, The Lean Startup

Page 4: Why Startups Are Still On AWS

Startups fail?

Page 5: Why Startups Are Still On AWS

Assume customer is known

Assume features are known

Assume solution is known

Page 6: Why Startups Are Still On AWS

Waterfall approach You know the problem and the solution

Page 7: Why Startups Are Still On AWS

TEST LAUNCH BUILD SPEC

Known set of

requirements

Known ways to

satisfy them

Page 8: Why Startups Are Still On AWS

Agile methodologies You know the problem, not the solution

Page 9: Why Startups Are Still On AWS

TEST LAUNCH BUILD SPEC

Known set of

requirements

Unknown ways

to satisfy them

VALID?

Page 10: Why Startups Are Still On AWS

You don't know precisely

what problem you solve

Page 11: Why Startups Are Still On AWS
Page 12: Why Startups Are Still On AWS
Page 13: Why Startups Are Still On AWS

Lean startups:

LEARN & ADAPT

Page 14: Why Startups Are Still On AWS

1. Focus on a simple implementation

of your idea

Page 15: Why Startups Are Still On AWS

1. Focus on a simple implementation of

your idea

2. Start with a minimal core set of

features

Page 16: Why Startups Are Still On AWS

1. Focus on a simple implementation of

your idea

2. Start with a minimal core set of

features

3. Release and listen to your users

Page 17: Why Startups Are Still On AWS

1. Focus on a simple implementation of

your idea

2. Start with a minimal core set of

features

3. Release and listen to your users

4. Question your initial assumptions

based on feedback

Page 18: Why Startups Are Still On AWS

1. Focus on a simple implementation of

your idea

2. Start with a minimal core set of

features

3. Release and listen to your users

4. Question your initial assumptions

based on feedback

5. Rinse and repeat

Page 19: Why Startups Are Still On AWS

MVP Minimum Viable Product

Page 20: Why Startups Are Still On AWS

MVP Smallest thing I can do to test my idea?

Page 21: Why Startups Are Still On AWS

« If you're not embarrassed

when you ship your first version

you waited too long »

Matt Mullenweg

CEO & Founder of WordPress

Page 22: Why Startups Are Still On AWS
Page 23: Why Startups Are Still On AWS
Page 24: Why Startups Are Still On AWS

Staying lean is creating the

smallest viable product and

then iterate around it You don't know precisely your user's needs

Page 25: Why Startups Are Still On AWS

RELEASE EVAL BUILD IDEA

Unknown set of

requirements

Unknown ways

to satisfy them

ITERATE OR

PIVOT

Page 26: Why Startups Are Still On AWS

RELEASE EVAL BUILD IDEA ITERATE

OR

PIVOT

Page 27: Why Startups Are Still On AWS
Page 28: Why Startups Are Still On AWS

YOUR problem you have the idea

you don't have the resources

Page 29: Why Startups Are Still On AWS

It should be cheap and validate ideas

Page 30: Why Startups Are Still On AWS

SPEED AND AGILITY

Experiment

Often

Fail quickly

at a low cost

More

Innovation

Experiment

Infrequently

Failure is

expensive

Less

Innovation

“ON-PREMISE”

Page 31: Why Startups Are Still On AWS

RELEASE EVAL BUILD IDEA ITERATE

OR

PIVOT

Page 32: Why Startups Are Still On AWS

you created a fantastic webapp

http://www.flickr.com/photos/scobleizer/3985020876/

Page 33: Why Startups Are Still On AWS

people love your app

http://www.flickr.com/photos/grantrobertson/448648883

1

Page 34: Why Startups Are Still On AWS

and everyone wants to use it!

Page 35: Why Startups Are Still On AWS

http://www.flickr.com/photos/livingos/4480894461/

Page 36: Why Startups Are Still On AWS

the traditional way…

Page 37: Why Startups Are Still On AWS

invest on infrastructure

Page 38: Why Startups Are Still On AWS

capacity planning…

http://www.flickr.com/photos/mutsmuts/4695658106

/

…capacity guessing

Page 39: Why Startups Are Still On AWS

once it's deployed…

maintenance?

monitoring?

log analysis?

test environments?

http://www.old-computers.com/news

Page 40: Why Startups Are Still On AWS

Unable to

serve

customers

Infrastructure

Cost $

time

Large

Capital

Expenditure

Opportunity

Cost

Predicted

Demand

Traditional

Hardware

Actual

Demand

Automated

Virtualization

Page 41: Why Startups Are Still On AWS

with AWS…

Page 42: Why Startups Are Still On AWS
Page 43: Why Startups Are Still On AWS
Page 44: Why Startups Are Still On AWS

“When we started musiXmatch in 2010, we wanted

to focus on building a great user experience for our

users and our customers", says Francesco Delfino,

cofounder, "We choose Amazon Web Services

because it allowed us to freely define and fine tune

our server architecture, while shielding us from

common hardware issues.

During these years, AWS sustained our growth

providing the resources we needed as soon as our

traffic increased: there is no bigger cost for a startup

than missing the opportunity to scale exactly when

you need it.”

Page 45: Why Startups Are Still On AWS
Page 46: Why Startups Are Still On AWS
Page 47: Why Startups Are Still On AWS

“Amazon Web Services gives us the

power to scale our infrastructure

without worrying about capacity limits.

Our infrastructure is distributed and

currently runs on 3 regions.”

www.spreaker.com

Page 48: Why Startups Are Still On AWS

RELEASE EVAL BUILD IDEA ITERATE

OR

PIVOT

Page 49: Why Startups Are Still On AWS

Data based

decision making

Page 50: Why Startups Are Still On AWS

1. Collect as much data as you can

Page 51: Why Startups Are Still On AWS

1. Collect as much data as you can

2. Do A/B testing

Page 52: Why Startups Are Still On AWS

1. Collect as much data as you can

2. Do A/B testing

3. Drive your development by

user's feedback

Page 53: Why Startups Are Still On AWS

Store valuable data sources Server logs, click streams, application events, …

Page 54: Why Startups Are Still On AWS
Page 55: Why Startups Are Still On AWS

"Hadoop is a reliable storage and data analysis system"

HDFS MapReduce

Page 56: Why Startups Are Still On AWS

Deploying a Hadoop cluster is hard

http://eddie.niese.net/20090313/dont-pity-incompetence/

Page 57: Why Startups Are Still On AWS

Amazon Elastic

MapReduce Hadoop + The AWS Cloud

Page 58: Why Startups Are Still On AWS
Page 59: Why Startups Are Still On AWS
Page 60: Why Startups Are Still On AWS

Elastic Data Warehouse

Expand to

25 instances

Data Warehouse

(Steady State)

Data Warehouse

(Batch Processing)

Shrink to

9 instances

Data Warehouse

(Steady State)

Page 61: Why Startups Are Still On AWS

3.5 billion records, 71 million unique cookies, 1.7 million targeted ads required per day

Targeted Ad

User recently

purchased a

sports movie and

is searching for

video games (1.7 Million per day)

Leveraged AWS and Elastic MapReduce 100 node cluster on demand

Processing time dropped from 2+ days to 8 hours

Increased ROAS by 500%

Page 62: Why Startups Are Still On AWS
Page 63: Why Startups Are Still On AWS

We use EC2, Auto

Scaling and Elastic Load

Balancing to deliver ads

along side our main

infrastructure.

We automatically absorb

peaks through scripts

monitoring our local farm,

and change entries in the

Route 53 (DNS) when

needed, allowing more

traffic towards AWS load

balancers.

www.dotandmedia.com

Page 64: Why Startups Are Still On AWS

RELEASE EVAL BUILD IDEA ITERATE

OR

PIVOT

Page 65: Why Startups Are Still On AWS

Iterate Enhance your product, get more feedback

to prepare next releases

Page 66: Why Startups Are Still On AWS

The platform grows with you Add or remove components as needed

Scale up – scale down

Pay as you go

Page 67: Why Startups Are Still On AWS

Pivot If no traction, pivot to address a different

vertical, a different problem

Page 68: Why Startups Are Still On AWS

POSSIBLE

OFFERING

POSSIBLE

OFFERING

POSSIBLE

OFFERING

POSSIBLE

OFFERING

PROBLEM

SPACE

Page 69: Why Startups Are Still On AWS

POSSIBLE

OFFERING

POSSIBLE

OFFERING

POSSIBLE

OFFERING

PROBLEM

SPACE

POSSIBLE

OFFERING

Page 70: Why Startups Are Still On AWS

Getting the right features matters less

Knowing what's not working,

quickly, matters more

Page 71: Why Startups Are Still On AWS

Getting the right features matters less

Knowing what's not working,

quickly, matters more

Page 72: Why Startups Are Still On AWS

Experiment and

Innovate

Page 73: Why Startups Are Still On AWS

Lean startup goal is to accelerate the cycle

Page 74: Why Startups Are Still On AWS

CONTINUOUS

INTEGRATION

Page 75: Why Startups Are Still On AWS

DEVELOPER

Page 76: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

Page 77: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

Page 78: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

Page 79: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

PICK

TASKS

Page 80: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

SUBMIT

CODE

Page 81: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

SCHEDULE

BUILD

Page 82: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

RECURENT

BUILDS

Page 83: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

CODE

FETCH

Page 84: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

CODE QUALITY

TESTS

TEST

RESULTS

Page 85: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

BUILD OUTPUT

Page 86: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

PROJECT MANAGEMENT

SERVER

CONTINUOUS

INTEGRATION SERVER

DOCS

BINARIES /

PACKAGES

Page 87: Why Startups Are Still On AWS
Page 88: Why Startups Are Still On AWS

SOURCE CODE

REPOSITORY

DNS

CONTINUOUS

INTEGRATION SERVER

PROJECT

MANAGEMENT SERVER

BUILDS

Page 89: Why Startups Are Still On AWS

PAIN POINTS: • UNIT TESTS INCOMPLETE

• MOCKS MAINTENANCE

• TEST ENV EXPENSIVE

• TEST ENV ≠ PROD

Page 90: Why Startups Are Still On AWS

KEY = ITERATION

Page 91: Why Startups Are Still On AWS

ITERATIVELY MODIFY THE

SYSTEM TO BETTER MEET

THE EXPECTATIONS OF

YOUR USERS

Page 92: Why Startups Are Still On AWS

ON-DEMAND

PAY AS YOU GO

ELASTIC

Page 93: Why Startups Are Still On AWS

AWS

CLOUDFORMATION STACK-BASED DEPLOYMENT

SERVICE

Page 94: Why Startups Are Still On AWS

CLOUDFORMATION

TEMPLATE

Page 95: Why Startups Are Still On AWS
Page 96: Why Startups Are Still On AWS

{

"Description" : "Create RDS with username and

password",

"Resources" : {

"MyDB" : {

"Type" : "AWS::RDS::DBInstance",

"Properties" : {

"AllocatedStorage" : "500",

"DBInstanceClass" : "db.m1.small",

"Engine" : "MySQL",

"EngineVersion" : "5.5",

"MasterUsername" : "MyName",

"MasterUserPassword" : "MyPassword"

}

}

}

}

Page 97: Why Startups Are Still On AWS

"AWS::CloudFormation::Init" : {

"config" : {

"packages" : {

"yum" : {

"mysql" : [],

"mysql-server" : [],

"httpd" : [],

"php" : [],

"php-mysql" : []

}

},

"sources" : {

"/var/www/html" :

"https://s3.amazonaws.com/my-builds/build-

v4.zip"

}

}

}

Page 98: Why Startups Are Still On AWS

{

"Parameters" : {

"KeyName" : {

"Description" : "Name of an existing EC2

KeyPair to enable SSH

access to the instance",

"Type" : "String"

}

},

}

Page 99: Why Startups Are Still On AWS

CLOUDFORMATION

TEMPLATE

PROCEDURAL

DEFINITION Create it programmatically

KNOWN

CONFIGURATION Store stack configuration in

source control

PARAMETER

DRIVEN Dynamic and user-driven

templates

COLLABORATION Share templates with ease

as just files

Page 100: Why Startups Are Still On AWS
Page 101: Why Startups Are Still On AWS
Page 102: Why Startups Are Still On AWS

Template ELBs to front

secondary cache

~100 Nginx

secondary cache

servers

2-3 Nginx mid-tier

cache servers

Stack

CLOUDFORMATION TEMPLATE

VIDEO CACHING

INFRASTRUCTURE

Page 103: Why Startups Are Still On AWS

APPLICATION

VERSIONS

& INFRASTRUCTURE

VERSIONS

Page 104: Why Startups Are Still On AWS

CLOUDFORMATION

TEMPLATE

Page 105: Why Startups Are Still On AWS

TEST ENVIRONMENTS

Page 106: Why Startups Are Still On AWS
Page 107: Why Startups Are Still On AWS

30,000 REQUESTS / SECOND

1 TB TRAFFIC / DAY

Page 108: Why Startups Are Still On AWS

“…AWS seemed to be the best solution available to allow a small, independent company to rapidly develop and test a completely new infrastructure,

and host it.

We also loved the flexibility that AWS allowed us, when spinning up smaller test environments, for

beta trials, QA, localization, and during development. The low initial cost was also

crucial.”

Alex Evans, CTO

Page 109: Why Startups Are Still On AWS

CONTINUOUS

INTEGRATION

CONTINUOUS

DEPLOYMENT

Page 110: Why Startups Are Still On AWS

CONTINUOUS

DEPLOYMENT SMALL, FREQUENT CHANGES

CONSTANTLY INTEGRATING INTO

PRODUCTION.

Page 111: Why Startups Are Still On AWS

SOFTWARE DEPLOY

≠ PRODUCT LAUNCH

Page 112: Why Startups Are Still On AWS
Page 113: Why Startups Are Still On AWS
Page 114: Why Startups Are Still On AWS

1.5 BILLION PAGE VIEWS

OCTOBER 2012

$83 MILLION IN TRANSACTIONS

4.2 MILLION ITEMS SOLD

Page 115: Why Startups Are Still On AWS

30 DEPLOYS PER DAY = 1 DEPLOY EVERY 20 MINUTES

Page 116: Why Startups Are Still On AWS

« Complexity arises when the

dependencies among the

elements become important. »

Scott E. Page, John H. Miller,

Complex Adaptive Systems: An Introduction to

Computational Models of Social Life

Page 117: Why Startups Are Still On AWS

“Production is truly the only place

you can validate your code.”

Page 118: Why Startups Are Still On AWS
Page 119: Why Startups Are Still On AWS
Page 120: Why Startups Are Still On AWS
Page 121: Why Startups Are Still On AWS
Page 122: Why Startups Are Still On AWS

HTTPS://GITHUB.COM/ETSY/DEPLOYINATOR

HTTP://CODEASCRAFT.ETSY.COM/

Page 123: Why Startups Are Still On AWS
Page 124: Why Startups Are Still On AWS
Page 125: Why Startups Are Still On AWS
Page 126: Why Startups Are Still On AWS
Page 127: Why Startups Are Still On AWS

HTTP://SORCERY.SMUGMUG.COM/

Page 128: Why Startups Are Still On AWS

AWS OPSWORKS MANAGING THE COMPLETE

APPLICATION LIFECYCLE

Page 129: Why Startups Are Still On AWS

A stack represents

your application. One

stack might be used

for staging and

another for production.

A layer defines how to

setup and configure a

set of instances and

related resources

such as volumes

and software.

Tell OpsWorks where

it can find your code

and define any

additional deployment

tasks. OpsWorks will

take care of deploying

your app.

Scale your stack

based on time or

load. Clone your

production stack to a

different region.

Automate workflows

for common tasks.

STACK | LAYER | APP | INSTANCE

GETTING STARTED WITH OPSWORKS

Page 130: Why Startups Are Still On AWS

YOUR STACKS IN THE DASHBOARD

Page 131: Why Startups Are Still On AWS

STACK OVERVIEW

Page 132: Why Startups Are Still On AWS

LAYERS IN A STACK

Page 133: Why Startups Are Still On AWS

INSTANCES IN A STACK

Page 134: Why Startups Are Still On AWS

APPS IN A STACK

Page 135: Why Startups Are Still On AWS

DEPLOYMENTS & COMMANDS

Page 136: Why Startups Are Still On AWS

YOU CAN BRING YOUR

OWN CHEF RECIPES OR

LEVERAGE HUNDREDS

OF COMMUNITY-BUILT

CONFIGURATIONS

Page 137: Why Startups Are Still On AWS
Page 138: Why Startups Are Still On AWS
Page 139: Why Startups Are Still On AWS

14 BILLION REQUESTS/MONTH

50 000 DATABASE UPDATES / SEC

NO CACHE

Page 140: Why Startups Are Still On AWS

“AWS OpsWorks gives us the tools we

need to automate operations.

We can scale Monster World, one of the

largest Facebook games, to millions of

users without ever needing more than two

backend developers”

Jesper Richter-Reichhelm

Head of engineering – Wooga

Page 141: Why Startups Are Still On AWS

A / B TESTING

Page 142: Why Startups Are Still On AWS
Page 143: Why Startups Are Still On AWS
Page 144: Why Startups Are Still On AWS
Page 145: Why Startups Are Still On AWS
Page 146: Why Startups Are Still On AWS

LOAD TESTING

Page 147: Why Startups Are Still On AWS
Page 148: Why Startups Are Still On AWS
Page 149: Why Startups Are Still On AWS
Page 150: Why Startups Are Still On AWS
Page 151: Why Startups Are Still On AWS
Page 152: Why Startups Are Still On AWS

USING AMAZON EC2 TO SIMULATE

2.4 MILLION PLAYERS

Page 153: Why Startups Are Still On AWS
Page 154: Why Startups Are Still On AWS
Page 155: Why Startups Are Still On AWS

DATA-DRIVEN

ARCHITECTURES

Page 156: Why Startups Are Still On AWS

METRICS @ETSY

Page 157: Why Startups Are Still On AWS

COST-ORIENTED

ARCHITECTURES

Page 158: Why Startups Are Still On AWS

PHP+APACHE+VARNISH

NGINX+NODEJS

Page 159: Why Startups Are Still On AWS
Page 160: Why Startups Are Still On AWS

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

Page 161: Why Startups Are Still On AWS

CONTINUOUS

DEPLOYMENT

=

CONTINUOUS

EXPERIMENTATION

Page 162: Why Startups Are Still On AWS

CONTINUOUS

DEPLOYMENT

=

CONTINUOUS

IMPROVEMENT

Page 163: Why Startups Are Still On AWS

FASTEST TIME TO

MARKET

Page 165: Why Startups Are Still On AWS

“The AWS Cloud brings business agility as Shell is able to deploy services much more quickly”

Johan Krebbers

Vice President of Architecture

Page 166: Why Startups Are Still On AWS
Page 167: Why Startups Are Still On AWS

“AWS has enabled Soundtracker to

perform nimble development” says

Daniele Calabrese, Founder and CEO,

“allowing our service to scale quickly,

effectively, and seamlessly.”

Page 168: Why Startups Are Still On AWS

focus on your business

Page 169: Why Startups Are Still On AWS
Page 170: Why Startups Are Still On AWS
Page 171: Why Startups Are Still On AWS

Stefano Pochet, founder and CEO of Nealab, explains,

“Amazon Web Services fits the need for flexibility and

reliability required by high-traffic Web applications. In

addition, it makes it easier and cheaper to maintain our

entire infrastructure.”

“AWS has allowed us to forget about hardware and

focus on software. For us, AWS has really made Web

development easier.”