Discover how mobile game companies are leveraging AWS to build cost-effective, scalable games. Learn how companies like Supercell are using EC2 and S3 to run their online game servers. Understand the challenges in scaling game databases, and how developers like Halfbrick use DynamoDB to overcome these demands. Learn how you can use the new EC2 G2 and C3 instances to run multiplayer games in the cloud. Finally, see how developers like Rovio are using SNS to send mobile push notifications to keep players engaged.
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Scalable Gaming with AWS - GDC 2014
1. AWS Gaming Solutions | GDC 2014
Scalable Gaming with AWS
Or, How to go from 1,000 to 1,000,000 users without starting over
Nate Wiger @nateware | Principal Gaming Solutions Architect
2. AWS Gaming Solutions | GDC 2014
What's In It For Me?
• Why AWS for Games?
• Core Game Backend
• Scaling Data with DynamoDB
• Low-Latency Multiplayer with C3
• Mobile Push Notifications
8. AWS Gaming Solutions | GDC 2014
Game Backend Concepts
• Think in terms of API's
• Get friends, leaderboard
• HTTP+JSON
• Binary asset data
• Mobile push
• Multiplayer servers
9. AWS Gaming Solutions | GDC 2014
Core Game Backend
ELB
S3
• Choose Region
• Elastic Load Balancer
• Two Availability Zones
• EC2 for App
• RDS Database
• Multi-AZ
• S3 for Game Data
• Assets
• UGC
• Analytics
Region
10. AWS Gaming Solutions | GDC 2014
Scale It Way Out
ELB
S3
• Auto Scaling Group
• Capacity on Demand
• Respond to Users
EC2EC2EC2
Region
11. AWS Gaming Solutions | GDC 2014
Scale It Way Out
ELB
S3
• Auto Scaling Group
• Capacity on Demand
• Respond to Users
• ElastiCache
• Memcache
• Redis EC2EC2EC2
Region
12. AWS Gaming Solutions | GDC 2014
Scale It Way Out
CloudFront
CDN
ELB
S3
EC2EC2EC2
Region
• Auto Scaling Group
• Capacity on Demand
• Respond to Users
• ElastiCache
• Memcache
• Redis
• CloudFront CDN
• DLC, Assets
• Game Saves
• UGC
14. AWS Gaming Solutions | GDC 2014
Elastic Beanstalk
• Managed Container
• Git Push or Zip Upload
• ELB, EC2, RDS
• Web Dashboard
• Same Performance
• So Yeah, Use It
19. AWS Gaming Solutions | GDC 2014
Region
Writing Is Painful
Availability
Zone A
Availability
Zone B
S3
EC2
• Games are Write Heavy
• Caching of Limited Use
• Key Value Key Value
• Binary Structures
• Database = Bottleneck
ELB
EC2
CloudFront
CDN
21. AWS Gaming Solutions | GDC 2014
DynamoDB
Availability
Zone A
Availability
Zone B
S3
• NoSQL Data Store
• Fully-Managed
• Highly Available
• PUT/GET Keys
• Secondary Indexes
• Provisioned Throughput
• Auto Scaling
EC2 EC2
ELB
CloudFront
CDN
Elastic Beanstalk Container
22. AWS Gaming Solutions | GDC 2014
Leaderboard in DynamoDB
• Hash key = Primary key
• Range key = Sub key
• Others attributes are
unstructured, unindexed
• So… How to sort based
on Top Score?
23. AWS Gaming Solutions | GDC 2014
Leaderboard with Secondary Indexes
• Create a secondary index!
• Set hash key to Game Level
• Set range key to Top Score
• Can now query by Level,
Sorted by Top Score
• Handles any (sane) gaming
use case
27. AWS Gaming Solutions | GDC 2014
C3 Instance
• High packets per second
• Very low latency, jitter
• Intel Ivy Bridge CPU
• SSD's
• Built for games
• 15 cents / hour
29. AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
EC2EC2 EC2
Region
• Beanstalk App
• Core Session
• Matchmaking
• Public Server Tier
• Direct Client Socket
• Scale on Players
• CloudFront CDN
• DLC, Assets
• Game Saves
• UGC
EC2
30. AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
EC2EC2 EC2
Region
EC2
31. AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
④ Connect to Server
⑤ Pull Down Assets
⑥ Other Players Join
EC2EC2 EC2
Region
EC2
32. AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
④ Connect to Server
⑤ Pull Down Assets
⑥ Other Players Join
⑦ Game Ends
⑧ Update Stats
EC2EC2 EC2
Region
EC2
40. AWS Gaming Solutions | GDC 2014
Wrap It Up Already
• Start Simple With Beanstalk
• Go Directly to DynamoDB, Do Not Pass Go
• CloudFront + S3 for Download and Upload
• Add Multiplayer - Hybrid
• Use the EC2 C3 Instance
• SQS to Decouple and Scale