Traditional: Rigid AWS: Elastic
Servers
Demand
Capacity
Excess Capacity
Wasted $$
Demand
Unmet Demand
Upset Players
Missed Revenue :(
11 Regions
52 Edge Locations
Continuous Expansion
Multiplayer
Leaderboards
Multi-platform Achievements
Power-ups
In-game purchases
Multi-ballBreak-out mode
ELB
• Choose region
• >=2 Availability Zones
• Amazon EC2 for app
• Elastic Load Balancing
• Amazon RDS database
• Multi-AZ
Region
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
Region
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
Region
CloudFront
CDN
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
• Auto Scaling Group
• Capacity on demand
• Respond to users
• Automatic healing
ELB
Region
CloudFront
CDN
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
• Auto Scaling Group
• Capacity on demand
• Respond to users
• Automatic healing
• Amazon ElastiCache
• Memcached
• Redis
ELB
Region
CloudFront
CDN
• Games are write heavy
• Caching of limited use
• Key value key value
• Binary structures
• Database = bottleneck
ELB
Region
CloudFront
CDN
(not fun)
• Fully-managed
• NoSQL data store
• Provisioned throughput
• Secondary indexes
• PUT/GET keys
• Document Support!
• 400 KB Items
• Reindexing (Soon!)
• Auto Scaling (OSS)
ELB
Region
CloudFront
CDN
• Hash key = Primary key
• Range key = Sub key
• Range key = Sort key
• Others attributes are
undefined
• So… How to sort based
on Top Score?
UserID
(hash key)
BoardName
(range key)
TopScore TopScoreDate
"101" "Galaxy Invaders" 5842 "2014-09-15T17:24:31"
"101" "Meteor Blasters" 1000 "2014-10-22T23:18:01"
"101" "Starship X" 24 "2014-08-31T13:14:21"
"102" "Alien Adventure" 192 "2014-07-12T11:07:56"
"102" "Galaxy Invaders" 0 "2014-09-18T07:33:42"
"103" "Attack Ships" 3 "2014-10-19T01:13:24"
"103" "Galaxy Invaders" 2317 "2014-09-11T06:53:00"
"103" "Meteor Blasters" 723 "2014-10-19T01:14:24"
"103" "Starship X" 42 "2014-07-11T06:53:03"
• Create a secondary index!
• Set hash key to BoardName
• Set range key to TopScore
• Project extra attributes as needed
• Can now query by BoardName,
Sorted by TopScore
• Handles many common gaming
use case
BoardName
(hash key)
TopScore
(range key)
UserID
"Alien Adventure" 192 "101"
"Attack Ships" 3 "103"
"Galaxy Invaders" 0 "102"
"Galaxy Invaders" 2317 "103"
"Galaxy Invaders" 5842 "101"
"Meteor Blasters" 723 "103"
"Meteor Blasters" 1000 "101"
"Starship X" 24 "101"
"Starship X" 42 "103"
UserID
(hash key)
BoardName
(range key)
TopScore TopScoreDate
"101" "Galaxy Invaders" 5842 "2014-09-15T17:24:31"
• Document types: List, Map
• Document content addressing
"name": "Martin",
"games": ["Megablast","Spacerace"],
"score": {"Megablast" : 123,"Spacerace" : 41
}
"name": {"S": "Martin"
}"games": {
"L": [ { "S": "Megablast" },{ "S": "Spacerace" } ]
},"score": {
"M": {"Megablast": { "N": "123" },"Spacerace": { "N": "41" }
}}
, Boolean, Null
"name": {"S": "Martin"
}"games": {
"L": [ { "S": "Megablast" },{ "S": "Spacerace" } ]
},"score": {
"M": {"Megablast": { "N": "123" },"Spacerace": { "N": "41" }
}}
document.score.Megablast
SOV204 Scaling Up to Your First 10 Million Users
SDD407 Amazon DynamoDB: Data Modeling and Scaling Best Practices
GAM302 EA's Real-World Hurdles with Millions of Players in the
Simpsons: Tapped Out
Region
• API backend app
• Core session
• Matchmaking
• S3+CloudFront
• DLC, assets
• Game saves
• UGC
• Public server tier
• Direct client socket
• Scale on players
① Login via API
② Request matchmaking
③ Get game server IP
Region
① Login via API
② Request matchmaking
③ Get game server IP
④ Connect to server
⑤ Pull down assets
⑥ Other players join
Region
Region ARegion B
GAM402 Deploying a Low-Latency Multiplayer Game Globally: Loadout
GAM404 Gaming DevOps: Scopely's Continuous Deployment Pipeline
GAM405 Create Streaming Game Experiences with Amazon AppStream
Load test environment
Metrics tools
0 20 40 60 80
05
00
01
000
01
50
00
20
000
25
00
03
00
00
Engine Ping
Minutes
Mill
ise
co
nds
ccu
95th
max
median
min
0 20 40 60 80
05
00
01
000
01
50
00
20
000
25
00
03
00
00
Join OK
Minutes
Mill
ise
co
nds
ccu
95th
max
median
min
0 20 40 60 80
05
00
01
00
00
150
00
20
00
02
500
030
00
0
Spawn OK
Minutes
Mill
ise
co
nd
s
ccu
95th
max
median
min
0 20 40 60 80
05
00
01
00
00
150
00
20
00
02
500
030
00
0
Turf API
Minutes
Mill
ise
co
nd
s
ccu
95th
max
median
min
bad
0 20 40 60 80 100
020
00
04
00
00
60
00
08
00
00
Engine Ping
MinutesM
illis
eco
nds
ccu
95th
max
median
min
0 20 40 60 80 100
020
00
04
00
00
60
00
08
00
00
Join OK
Minutes
Mill
ise
co
nds
ccu
95th
max
median
min
0 20 40 60 80 100
02
00
00
40
00
06
00
00
80
00
0
Spawn OK
Minutes
Mill
ise
co
nd
s
ccu
95th
max
median
min
0 20 40 60 80 100
02
00
00
40
00
06
00
00
80
00
0
Turf API
Minutes
Mill
ise
co
nd
s
ccu
95th
max
median
min
Better!
GAM303 Beyond Game Servers: Load Testing, Rendering, and Cloud Gaming
WEB306 UI, Load, and Performance Testing Your Websites on AWS
GAM301 Real-Time Game Analytics with Kinesis, Redshift, and DynamoDB
GAM304 How Riot Games re:Invented their AWS Model
ARC302 Running Lean Architectures: How to Optimize for Cost Efficiency
wow
so managed
much gaming
such available
very scaling
Please give us your feedback on this session.
Complete session evaluations and earn re:Invent swag.
http://bit.ly/awsevals