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

Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Scale Failor, how I learned to stop worrying

and love the downtime

Page 2: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic
Page 3: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic
Page 4: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Downtimeis

Sexy

Page 5: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

1. Be Trendy

Page 6: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic
Page 7: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic
Page 8: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Resource MonitoringPerformance TestingTraffic MonitoringLoad TestingTuning Analysis

Page 9: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

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 - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Barn Door Troubleshooting

Page 11: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Parallel Programming

NOT SEXY

Page 12: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Don'tWorryAbout

ItProgram-

ming SEXY

Page 13: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

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 - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

The Old Way: Caching

DB

AppServer

AppServer

AppServer

WebServer

WebServer

WebServer

Co

nne

ctio

n C

achi

ng

Po o

l

Da

ta C

ache

Obj

ect

Cac

h e

HT

TP

Cac

he

Page 15: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

The New Way: Direct2DB

DB

WebServer

WebServer

WebServer

HT

TP

Cac

he

Page 16: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Easy to Scale

For Wimps!

● Web servers● Caches● Shared-nothing hosts● Simple App Servers

Page 17: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Hard to Scale

For Real Developers!

● Databases● Queues● Shared Filesystems● Web Frameworks

Page 18: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

SPoF

Page 19: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

UserDB

AppServer

AppServer

AppServer

WebServer

WebServer

WebServer

PageDB

Single Point of Failure

LoadBalancer

TaskManager

LoadBalancer

Page 20: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

UserDB

AppServer

AppServer

WebServer

WebServer

WebServer

PageDB

Cascading Failure

LoadBalancer

TaskManager

LoadBalancer

Page 21: Scale Fail - socallinuxexpo.org · Scale Fail or, how I learned to stop worrying and love the downtime. Downtime is Sexy. 1. Be Trendy. Resource Monitoring Performance Testing Traffic

Be Sexy:

Go Down!