(GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014
-
Upload
amazon-web-services -
Category
Technology
-
view
700 -
download
2
description
Transcript of (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014
![Page 1: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/1.jpg)
![Page 2: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/2.jpg)
![Page 3: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/3.jpg)
Traditional: Rigid AWS: Elastic
Servers
Demand
Capacity
Excess Capacity
Wasted $$
Demand
Unmet Demand
Upset Players
Missed Revenue :(
![Page 4: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/4.jpg)
11 Regions
52 Edge Locations
Continuous Expansion
![Page 5: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/5.jpg)
Multiplayer
Leaderboards
Multi-platform Achievements
Power-ups
In-game purchases
Multi-ballBreak-out mode
![Page 6: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/6.jpg)
![Page 7: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/7.jpg)
ELB
• Choose region
• >=2 Availability Zones
• Amazon EC2 for app
• Elastic Load Balancing
• Amazon RDS database
• Multi-AZ
Region
![Page 8: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/8.jpg)
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
Region
![Page 9: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/9.jpg)
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... with CloudFront!
Region
CloudFront
CDN
![Page 10: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/10.jpg)
• 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
![Page 11: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/11.jpg)
• 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
![Page 12: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/12.jpg)
• Games are write heavy
• Caching of limited use
• Key value key value
• Binary structures
• Database = bottleneck
ELB
Region
CloudFront
CDN
![Page 13: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/13.jpg)
(not fun)
![Page 14: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/14.jpg)
• 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
![Page 15: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/15.jpg)
• 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"
![Page 16: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/16.jpg)
• 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"
![Page 17: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/17.jpg)
• 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
![Page 18: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/18.jpg)
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
![Page 19: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/19.jpg)
Region
• API backend app
• Core session
• Matchmaking
• S3+CloudFront
• DLC, assets
• Game saves
• UGC
• Public server tier
• Direct client socket
• Scale on players
![Page 20: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/20.jpg)
① Login via API
② Request matchmaking
③ Get game server IP
Region
![Page 21: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/21.jpg)
① Login via API
② Request matchmaking
③ Get game server IP
④ Connect to server
⑤ Pull down assets
⑥ Other players join
Region
![Page 22: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/22.jpg)
Region ARegion B
![Page 23: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/23.jpg)
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
![Page 24: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/24.jpg)
![Page 25: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/25.jpg)
![Page 26: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/26.jpg)
![Page 27: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/27.jpg)
![Page 28: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/28.jpg)
![Page 29: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/29.jpg)
![Page 30: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/30.jpg)
![Page 31: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/31.jpg)
![Page 32: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/32.jpg)
![Page 33: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/33.jpg)
![Page 34: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/34.jpg)
![Page 35: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/35.jpg)
![Page 36: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/36.jpg)
![Page 37: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/37.jpg)
![Page 38: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/38.jpg)
![Page 39: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/39.jpg)
Load test environment
Metrics tools
![Page 40: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/40.jpg)
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
![Page 41: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/41.jpg)
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!
![Page 42: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/42.jpg)
![Page 43: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/43.jpg)
![Page 44: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/44.jpg)
![Page 45: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/45.jpg)
![Page 46: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/46.jpg)
![Page 47: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/47.jpg)
![Page 48: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/48.jpg)
![Page 49: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/49.jpg)
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
![Page 50: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/50.jpg)
wow
so managed
much gaming
such available
very scaling
![Page 51: (GAM201) Scalable Game Architectures That Don't Break the Bank | AWS re:Invent 2014](https://reader033.fdocuments.in/reader033/viewer/2022060118/5589e6d8d8b42a930c8b464d/html5/thumbnails/51.jpg)
Please give us your feedback on this session.
Complete session evaluations and earn re:Invent swag.
http://bit.ly/awsevals