In this session, AWS shares best practices for launching a game that can scale from 1,000 to 1,000,000 users, while paying only for what you use. We'll show how to create a game backend using Amazon EC2 and AWS Elastic Beanstalk. Learn about database scaling challenges, and how to use Amazon DynamoDB, Amazon RDS, and Amazon ElastiCache to address them. Then, see how to use AWS automation features such as CloudFormation to take your game to new regions worldwide. Finally, hear how to deliver game assets efficiently using Amazon S3 and Amazon CloudFront.
3. Traditional: Rigid AWS: Elastic
Servers
Demand
Capacity
Excess Capacity
Wasted $$
Demand
Unmet Demand
Upset Players
Missed Revenue :(
Scale to what you need, pay for what you use
5. Common game back-end concepts
Think in terms of APIs
HTTP + JSON
Get friends, leaderboard
Binary asset data
Multiplayer servers
High availability
Scalability
6. Core (HA) game back end
ELB
• Choose region
• >=2 Availability Zones
• Amazon EC2 for app
• Elastic Load Balancing
• Amazon RDS database
• Multi-AZ
Region
7. Scale it way out
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
Region
8. Scale it way out
ELB
• Amazon S3 for game data
• Assets
• UGC
• Analytics
• ... With Amazon
CloudFront!
Region
CloudFront
CDN
9. Scale it way out
• 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
10. Scale it way out
• 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
11. Writing is painful
• Games are write heavy
• Caching of limited use
• Key value
• Binary structures
• Database = bottleneck
ELB
Region
CloudFront
CDN
17. Related sessions
DAT204 NoSQL? No Worries: Building Scalable
Applications on AWS NoSQL Services
DAT401 Amazon DynamoDB Deep Dive: Schema Design,
Indexing, JSON, Search, and More
GAM401 Serverless Mobile Game Development with
Amazon Cognito, AWS Lambda, and Amazon
DynamoDB
68. Identity
Providers
Unique
IdentitiesJoe Anna Bob
Any Device
Any Platform
Any AWS
Service
Helps implement security best practices
Securely access any AWS service from mobile
device; it simplifies the interaction with AWS
Identity and Access Management
Support multiple login providers
Easily integrate with major login providers for
authentication, or use your own authentication
system
Unique users vs. devices
Manage unique identities; automatically recognize
unique user across devices and platforms
Mobile
Analytics
S3 DynamoDB Kinesis
Your own
Auth
Amazon Cognito
69. Synchronize data across devices with Amazon Cognito
Sync game state
across OS, devices
State transition
(link multiple accounts)
Sync user profiles
across OS, devices, web
70. Related sessions
GAM401 Serverless Mobile Game Development with
Amazon Cognito, AWS Lambda, and Amazon
DynamoDB
MBL402 Mobile Identity Management and Data
Synchronization Using Amazon Cognito
WRK202 Build a Scalable Mobile App on Serverless,
EventTriggered, BackEnd Logic
72. Multiplayer game servers
Region
• API back-end app
• Core session
• Matchmaking
• S3 + CloudFront
• DLC, assets
• Game saves
• UGC
• Public server tier
• Direct client socket
• Scale on players
74. Multiplayer game servers
① Login via API
② Request matchmaking
③ Get game server IP
④ Connect to server
⑤ Pull down assets
⑥ Other players join
Region
76. Related sessions
GAM403 From 0 to 60 Million Player Hours in 400 Billion
Star Systems
GAM404 Evolve: Hunting Monsters in a Low Latency
Multiplayer Game on Amazon EC2
GAM407 Quiplash: The Multiscreen, Multidevice,
Multiplayer Game for 10,000
77. Wrap it up already
Use Auto Scaling to save money
Amazon CloudFront + Amazon S3 for download and upload
Painful DIYDB? No! Use Amazon DynamoDB
Dynamically manage game servers using the APIs
• Even multiregion!