ccb 12 how draw something grew to 50 million downloads in 50 days
TRANSCRIPT
1
How Draw Something Grew to 50 Million Downloads in 50 Days
Frank WeigelVP, Products, Couchbase
@FrankWeigel
2
Draw Something by OMGPOP
3
Fastest Growing Mobile Game. Ever.
4
Draw Something Viral Growth
191715131197533/12826242220181614121082/6
Draw Something by OMGPOPDaily Active Users (millions)
21
2
4
6
8
10
12
14
16
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
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
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
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
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
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
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
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
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
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
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
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
17
Whack-a-bottleneck
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
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
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
21
THANK YOU
LEARN MORE AT HTTP://WWW.COUCHBASE.COM
@FRANKWEIGEL