21
1 How Draw Something Grew to 50 Million Downloads in 50 Days Frank Weigel VP, Products, Couchbase @FrankWeigel

CCB 12 How draw something grew to 50 million downloads in 50 days

Embed Size (px)

Citation preview

Page 1: CCB 12 How draw something grew to 50 million downloads in 50 days

1

How Draw Something Grew to 50 Million Downloads in 50 Days

Frank WeigelVP, Products, Couchbase

@FrankWeigel

Page 2: CCB 12 How draw something grew to 50 million downloads in 50 days

2

Draw Something by OMGPOP

Page 3: CCB 12 How draw something grew to 50 million downloads in 50 days

3

Fastest Growing Mobile Game. Ever.

Page 4: CCB 12 How draw something grew to 50 million downloads in 50 days

4

Draw Something Viral Growth

191715131197533/12826242220181614121082/6

Draw Something by OMGPOPDaily Active Users (millions)

21

2

4

6

8

10

12

14

16

Page 5: CCB 12 How draw something grew to 50 million downloads in 50 days

5

Scaling Isn’t Easy. Ask Homer.

191715131197533/12826242220181614121082/6

The Simpson’s: Tapped OutDaily Active Users (millions)

21

2

4

6

8

10

12

14

16

EA Launches The Simpsons Tapped Out

#2 Free app on iPad#3 Free app on iPhone

Page 6: CCB 12 How draw something grew to 50 million downloads in 50 days

6

In the Beginning…

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

Launch Day:30,000 downloads

Page 7: CCB 12 How draw something grew to 50 million downloads in 50 days

7

Initial Scalable Architecture

Amazon S3

NGINX & Thin Ruby App Server

• Designed for scalability

• Smart client style mobile app

• Scalable app server tier

• Scalable KV storage as SaaS

– Amazon S3

HAProxy (Load balancer)

Mobile App Frontend

Page 8: CCB 12 How draw something grew to 50 million downloads in 50 days

8

Application Layer Struggles

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

First week:Million downloads

30

,00

0 d

ow

nlo

ads

Page 9: CCB 12 How draw something grew to 50 million downloads in 50 days

9

Scaling App Layer

Amazon S3

• App server congestion

• Scalability isn’t all you need

• Synchronicity & high throughput don’t mix

NGINX & Thin Ruby App Server

HAProxy (Load balancer)

NGINX & Goliath Ruby App Server

Page 10: CCB 12 How draw something grew to 50 million downloads in 50 days

10

Data Layer Struggles

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

Weeks in:• 1.2 million downloads• 30 drawings/second

30

,00

0 d

ow

nlo

ads

1,0

00

,00

0 d

ow

nlo

ads

Page 11: CCB 12 How draw something grew to 50 million downloads in 50 days

11

NoSQL to the rescue.

• Couchbase Server NoSQLdatabase

• Easy on-line scalability

• Lazy migration for existing data

Couchbase Server

Amazon S3

HAProxy (Load balancer)

NGINX & Goliath Ruby App Server

Page 12: CCB 12 How draw something grew to 50 million downloads in 50 days

12

Scaling Out Under Load

REPLICA

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc 4

Doc 1

Doc

Doc

SERVER 1

REPLICA

ACTIVE

Doc 4

Doc 7

Doc

Doc

Doc 6

Doc 3

Doc

Doc

SERVER 2

REPLICA

ACTIVE

Doc 1

Doc 2

Doc

Doc

Doc 7

Doc 9

Doc

Doc

SERVER 3 SERVER 4 SERVER 5

REPLICA

ACTIVE

REPLICA

ACTIVE

Doc

Doc 8 Doc

Doc 9 Doc

Doc 2 Doc

Doc 8 Doc

Doc 5 Doc

Doc 6

READ/WRITE/UPDATE READ/WRITE/UPDATE

APP SERVER 1

COUCHBASE Client Library

CLUSTER MAP

COUCHBASE Client Library

CLUSTER MAP

APP SERVER 2

COUCHBASE SERVER CLUSTER

User Configured Replica Count = 1

Page 13: CCB 12 How draw something grew to 50 million downloads in 50 days

13

2M -> 4M Users in Two Days

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

Weeks in:• Number 1 in AppStore• Millions of new players per day• 1,000 drawings/second

30

,00

0 d

ow

nlo

ads

1,0

00

,00

0 d

ow

nlo

ads

2,0

00

,00

0 d

ow

nlo

ads

Page 14: CCB 12 How draw something grew to 50 million downloads in 50 days

14

Bigger is Still Better

• Linear Scalability! Oh no…

• Size matters

• SSD to fight fragmentation impact

Couchbase Server

HAProxy (Load balancer)

NGINX & Goliath Ruby App Server

Page 15: CCB 12 How draw something grew to 50 million downloads in 50 days

15

Nodes Fail, Game Must Go On

REPLICA

ACTIVE

Doc 5

Doc 2

Doc

Doc

Doc 4

Doc 1

Doc

Doc

SERVER 1

REPLICA

ACTIVE

Doc 4

Doc 7

Doc

Doc

Doc 6

Doc 3

Doc

Doc

SERVER 2

REPLICA

ACTIVE

Doc 1

Doc 2

Doc

Doc

Doc 7

Doc 9

Doc

Doc

SERVER 3 SERVER 4 SERVER 5

REPLICA

ACTIVE

REPLICA

ACTIVE

Doc 9

Doc 8

Doc Doc 6 Doc

Doc

Doc 5 Doc

Doc 2

Doc 8 Doc

Doc

Doc

Doc 1 Doc 3

APP SERVER 1

COUCHBASE Client Library

CLUSTER MAP

COUCHBASE Client Library

CLUSTER MAP

APP SERVER 2

User Configured Replica Count = 1

COUCHBASE SERVER CLUSTER

Page 16: CCB 12 How draw something grew to 50 million downloads in 50 days

16

Crazy Scale

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

Weeks in:>2000 drawings/secondOver 1 Billion Drawings

30

,00

0 d

ow

nlo

ads

1,0

00

,00

0 d

ow

nlo

ads

2,0

00

,00

0 d

ow

nlo

ads

12

,00

0,0

00

do

wn

load

s

Page 17: CCB 12 How draw something grew to 50 million downloads in 50 days

17

Whack-a-bottleneck

Page 18: CCB 12 How draw something grew to 50 million downloads in 50 days

18

Race to Keep Up

• Continue scaling all tiers

• Scale HAProxy tier

• Add DNS load balancing

• Don’t sleepNGINX & Goliath Ruby App Server

Couchbase Server

HAProxy

DNS Load Balancers

Page 19: CCB 12 How draw something grew to 50 million downloads in 50 days

19

50 Million Downloads in 50 Days

Draw Something by OMGPOPDaily Active Users (millions)

191715131197533/12826242220181614121082/6 21

2

4

6

8

10

12

14

16

30

,00

0 d

ow

nlo

ads

1,0

00

,00

0 d

ow

nlo

ads

2,0

00

,00

0 d

ow

nlo

ads

• 50 million downloads• 3,000+ drawings/second• 2 billion drawings• 105,000 TPS• 3.3 TB data stored

12

,00

0,0

00

do

wn

load

s

30

,00

0,0

00

do

wn

load

s

50

,00

0,0

00

do

wn

load

s

Page 20: CCB 12 How draw something grew to 50 million downloads in 50 days

20

Scalability Takeaways

• You can tune, but you can’t retrofit

• Scaling needs to be easy and online

• Failure is a certainty

• Bigger is still better

• Sleep is overrated

Page 21: CCB 12 How draw something grew to 50 million downloads in 50 days

21

THANK YOU

LEARN MORE AT HTTP://WWW.COUCHBASE.COM

@FRANKWEIGEL