92
Flexible Scaling How to handle 1 billion pageviews

Flexible Scaling - Webs - Flexible Scaling Final.pdf · Flexible Scaling H o w t o h a n d l e 1 b i l ... Warbook [email protected]. Created Date: 6/2/2008 8:01:28 PM

  • Upload
    ngocong

  • View
    217

  • Download
    2

Embed Size (px)

Citation preview

Flexible Scaling

H o w t o h a n d l e 1 b i l l i o n p a g e v i e w s

Hi

TJ

teej_m

HyaciaLvl 60 Rogue (Dragonblight)

10 Million Subscribers

400,000 hours a day

Gamers are Crazy

Not Much Else

+

= ?

What Is Warbook?

Text-Based

Browser-Based

War-Based

Social-Based

Game on Rails

+

= ?

Rails Doesn’t Scale

... Out of the Box

Where to begin?

FirebugNet tab

pl_analyze

iostat

mtop

You Need Tools

You Need Strategies

Don’t need it? Ditch it.

Slowing it down?

Simplify it.

Logging it?Don’t do it.

SELECTing it?Cache it.

How do you start?

memcache

memcache

memcache

Never Too Much Cache

Think In Gbs

Put Sessions In Cache

No-Select Design

cache_fu

GET

The Cache is Always Right

95% Hits on Cache

What’s Next?

Get on Amazon

Ubuntu 7.10

Amazon EC2ami-0cf61365

Your Server Needs Will

Change

Static File Server?

Add Another Box!

Lighttpd 1.4.13

Load Balancer?

Add Another Box!

Perlbal

Too Many Requests?

Add Another Box!

12x Mongrel

1 Database Box

1 Static Asset Box

1 Memcache Box

Load balancing

Mongrel Boxes

Moving Forward

“Load” bound

Database bound

I’m Fast. Now what?

The Hard Part

Scale Everything

else

Scale Your Deployment

Capistrano

Scale Your Support

Community Management

Developers need to develop

Scale Your Business

Warbook Server Costs:

$2,000/mo

You need money

Warbook Income:

$100,000/mo

Rails can scale