scale fail or, how i learned to stop worrying and love the downtime

21
Scale Fail or, how I learned to stop worrying and love the downtime

Upload: sherman-robinson

Post on 14-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scale Fail or, how I learned to stop worrying and love the downtime

Scale Failor, how I learned to stop worrying

and love the downtime

Page 2: Scale Fail or, how I learned to stop worrying and love the downtime
Page 3: Scale Fail or, how I learned to stop worrying and love the downtime
Page 4: Scale Fail or, how I learned to stop worrying and love the downtime

Downtimeis

Sexy

Page 5: Scale Fail or, how I learned to stop worrying and love the downtime

1. Be Trendy

Page 6: Scale Fail or, how I learned to stop worrying and love the downtime
Page 7: Scale Fail or, how I learned to stop worrying and love the downtime
Page 8: Scale Fail or, how I learned to stop worrying and love the downtime

Resource MonitoringPerformance TestingTraffic MonitoringLoad TestingTuning Analysis

Page 9: Scale Fail or, how I learned to stop worrying and love the downtime

Let History Be Your Guide Was database to slow last time?

The database is too slow this time. Did the network cards fry last time?

They're frying this time. Did Apache choke on memory leaks last time?

It's Apache this time. Fixed things by using queues at your last job?

Then fix them with queues at this job!

Page 10: Scale Fail or, how I learned to stop worrying and love the downtime

Barn Door Troubleshooting

Page 11: Scale Fail or, how I learned to stop worrying and love the downtime

Parallel Programming

NOT SEXY

Page 12: Scale Fail or, how I learned to stop worrying and love the downtime

Don'tWorryAbout

ItProgram-

ming SEXY

Page 13: Scale Fail or, how I learned to stop worrying and love the downtime

How to Single-ThreadYour Code

Locks, Locks, Locks! Ignore scope and memory address space Frequently-updated single-row table Master Control Server process Single Master Queue Blocking threads which wait while checking on

a remote data source

Page 14: Scale Fail or, how I learned to stop worrying and love the downtime

The Old Way: Caching

DB

AppServer

AppServer

AppServer

WebServer

WebServer

WebServer

Connection C

aching Pool

Data C

ache

Object C

ache

HT

TP

Cache

Page 15: Scale Fail or, how I learned to stop worrying and love the downtime

The New Way: Direct2DB

DB

WebServer

WebServer

WebServer

HT

TP

Cache

Page 16: Scale Fail or, how I learned to stop worrying and love the downtime

Easy to Scale

For Wimps!

Web servers Caches Shared-nothing hosts Simple App Servers

Page 17: Scale Fail or, how I learned to stop worrying and love the downtime

Hard to Scale

For Real Developers!

Databases Queues Shared Filesystems Web Frameworks

Page 18: Scale Fail or, how I learned to stop worrying and love the downtime

SPoF

Page 19: Scale Fail or, how I learned to stop worrying and love the downtime

UserDB

AppServer

AppServer

AppServer

WebServer

WebServer

WebServer

PageDB

Single Point of Failure

LoadBalancer

TaskManager

LoadBalancer

Page 20: Scale Fail or, how I learned to stop worrying and love the downtime

UserDB

AppServer

AppServer

WebServer

WebServer

WebServer

PageDB

Cascading Failure

LoadBalancer

TaskManager

LoadBalancer

Page 21: Scale Fail or, how I learned to stop worrying and love the downtime

Be Sexy:

Go Down!