Scaling for the Expected and Unexpected Brian Moon Senior Web - - PowerPoint PPT Presentation

scaling for the expected and unexpected
SMART_READER_LITE
LIVE PREVIEW

Scaling for the Expected and Unexpected Brian Moon Senior Web - - PowerPoint PPT Presentation

Scaling for the Expected and Unexpected Brian Moon Senior Web Engineer dealnews.com http://brian.moonspot.net/ twitter.com/brianlmoon Tuesday, June 23, 2009 Tuesday, June 23, 2009 Unexpected Likely one page.... at first Likely coming


slide-1
SLIDE 1

Scaling for the Expected and Unexpected

Brian Moon Senior Web Engineer dealnews.com http://brian.moonspot.net/ twitter.com/brianlmoon

Tuesday, June 23, 2009

slide-2
SLIDE 2

Tuesday, June 23, 2009

slide-3
SLIDE 3

Unexpected

Likely one page.... at first Likely coming from a single source

Tuesday, June 23, 2009

slide-4
SLIDE 4

Planned degradation

What can we take down? When should we take stuff down? What is acceptable service?

Tuesday, June 23, 2009

slide-5
SLIDE 5

Basic Caching

Caching Database Queries Caching Content File based caching memcached, in process cache, etc.

Tuesday, June 23, 2009

slide-6
SLIDE 6

Make Content Static

Copy pages to static files Do scheduled updates while under load

Tuesday, June 23, 2009

slide-7
SLIDE 7

Expected

Jun 06 - May 09

Tuesday, June 23, 2009

slide-8
SLIDE 8

Dec 26, 2006 Dec 1, 2008

Tuesday, June 23, 2009

slide-9
SLIDE 9

Proxy Servers

Reduce load on application servers Content caching Varnish, Squid, even home made

Tuesday, June 23, 2009

slide-10
SLIDE 10

Heavy Read Loads

Replicate for heavy read load Denormalization Collapse data into fewer tables Duplicating data is OK. Cache as needed

Tuesday, June 23, 2009

slide-11
SLIDE 11

Heavy Write Loads

Separate primary data storage (“write” servers) and read servers Write data out of band

Tuesday, June 23, 2009

slide-12
SLIDE 12

Testing

Decide how big you want to scale Benchmark the actual application Test against production environment Determine acceptable load Use a service (Keynote, Gomez)

Tuesday, June 23, 2009

slide-13
SLIDE 13

3rd Party Content

USE AN IFRAME! Piss off advertisers Tell them to get over it Tell sales “tough shit” Bonus Coverage

Tuesday, June 23, 2009