Scaling the synchronous web - Elaine Wherry

45
confidential scaling the synchronous scaling the synchronous web web October 10 October 10 th th , 2008 , 2008

description

Presentation from the Future of Web Apps Expo 2008 by Elaine Wherry.

Transcript of Scaling the synchronous web - Elaine Wherry

Page 1: Scaling the synchronous web - Elaine Wherry

confidential

scaling the synchronous webscaling the synchronous webOctober 10October 10thth, 2008, 2008

Page 2: Scaling the synchronous web - Elaine Wherry

confidential

scaling the synchronous webscaling the synchronous webOctober 10October 10thth, 2008, 2008

Elaine WherryCo-Founder, VP Products

Paul SowdenLead Software Engineer

Page 3: Scaling the synchronous web - Elaine Wherry
Page 4: Scaling the synchronous web - Elaine Wherry

www++

Page 5: Scaling the synchronous web - Elaine Wherry

2 3 4 5 6 7

Page 6: Scaling the synchronous web - Elaine Wherry
Page 7: Scaling the synchronous web - Elaine Wherry

traditional versus nontraditional...

traditional versus nontraditional...

Page 8: Scaling the synchronous web - Elaine Wherry

asynchronous versus synchronous...

Page 9: Scaling the synchronous web - Elaine Wherry
Page 10: Scaling the synchronous web - Elaine Wherry

asynchronous versus synchronous...

page views versus persistence...

content versus application...

database versus memory...

Page 11: Scaling the synchronous web - Elaine Wherry

simpler is better

know your bottlenecks

quick fix or homerun

useful abstractions

Page 12: Scaling the synchronous web - Elaine Wherry

#1: simpler is better

Page 13: Scaling the synchronous web - Elaine Wherry

protocol pluginsprotocol plugins

msn

msn

jab

ber

jab

ber

yah

oo

yah

oo

oscar (a

im)

oscar (a

im)

gaim 1.5.0ui & core & services

gaim 1.5.0ui & core & services

Page 14: Scaling the synchronous web - Elaine Wherry

yah

oo

yah

oo

gaim 1.5.0core & services

gaim 1.5.0core & services

protocol pluginsprotocol plugins

msn

msn

jab

ber

jab

ber

yah

oo

yah

oo

oscar (a

im)

oscar (a

im)

meebo network layermeebo network layer

Page 15: Scaling the synchronous web - Elaine Wherry
Page 16: Scaling the synchronous web - Elaine Wherry
Page 17: Scaling the synchronous web - Elaine Wherry

confidential

Page 18: Scaling the synchronous web - Elaine Wherry
Page 19: Scaling the synchronous web - Elaine Wherry

#1: simpler is better

Don’t try to solve a scaling problem you don’t have (yet)

Build it as quickly and as inexpensively as possible

You want to save time to iterate upon other ideas in case this one doesn’t work

Setting yourself up for success – easier to optimize something you understand

Page 20: Scaling the synchronous web - Elaine Wherry

#2 know your bottlenecks

confidential

Page 21: Scaling the synchronous web - Elaine Wherry
Page 22: Scaling the synchronous web - Elaine Wherry
Page 23: Scaling the synchronous web - Elaine Wherry

tools

stracegdboprofilehttpanalyzermonitoring

Page 24: Scaling the synchronous web - Elaine Wherry
Page 25: Scaling the synchronous web - Elaine Wherry

confidential

#2: know your bottlenecks

your type of app determines the type of scaling

don’t prematurely optimize

know system at different levels: oprofile, valgrind, gdb

know your bottlenecks: memory, cpu, bandwidth, storage, disk i/o

Page 26: Scaling the synchronous web - Elaine Wherry

#3: quick fix or #3: quick fix or homerun!homerun!

confidential

Page 27: Scaling the synchronous web - Elaine Wherry

kill –9 <pid>

Page 28: Scaling the synchronous web - Elaine Wherry
Page 29: Scaling the synchronous web - Elaine Wherry
Page 30: Scaling the synchronous web - Elaine Wherry
Page 31: Scaling the synchronous web - Elaine Wherry
Page 32: Scaling the synchronous web - Elaine Wherry

confidential

Page 33: Scaling the synchronous web - Elaine Wherry

confidential

Page 34: Scaling the synchronous web - Elaine Wherry
Page 35: Scaling the synchronous web - Elaine Wherry

cgifastcgi

mod_meebo

Page 36: Scaling the synchronous web - Elaine Wherry

#3: quick fix or homerun

users just want it to work (now)

use the time the quick fix affords you wisely

aim for small or big, avoid the middle

fix the root issue

Page 37: Scaling the synchronous web - Elaine Wherry

#4: useful abstractions#4: useful abstractions

Page 38: Scaling the synchronous web - Elaine Wherry
Page 39: Scaling the synchronous web - Elaine Wherry
Page 40: Scaling the synchronous web - Elaine Wherry

meebo

util.jsajax

ui

dlg

menubutton

element

IMDlg BuddyListDlg

EventMgr NetworkMgr

Page 41: Scaling the synchronous web - Elaine Wherry

meeboAppmeeboAppmeeboApp

meeboui

utilajax

PubSub

Buddy BuddyList Account

EventMgr NetworkMgr

dlg

menubutton

element

iPhoneiPhoneFirefox

Page 42: Scaling the synchronous web - Elaine Wherry

#4: useful abstractions

keep it simple, flexible, so you can adapt quickly to changes and scale with needs

abstractions allow you to reuse existing components to scale to new challenges

it’s hard to know where the useful abstractions are when you start a project

Page 43: Scaling the synchronous web - Elaine Wherry

simpler is better

know your bottlenecks

quick fix or homerun

useful abstractions

Page 44: Scaling the synchronous web - Elaine Wherry

today

3 years old45 people (2 dogs)35 million uniques per month350 years worth of usage per day200 million messages per day54,000 kiss emoticons each day :-*2.5 hour session length

Page 45: Scaling the synchronous web - Elaine Wherry

confidential

thank you