Your SlideShare is downloading. ×
0
AWS Gaming Solutions | GDC 2014
Scalable Gaming with AWS
Or, How to go from 1,000 to 1,000,000 users without starting over...
AWS Gaming Solutions | GDC 2014
What's In It For Me?
• Why AWS for Games?
• Core Game Backend
• Scaling Data with DynamoDB...
AWS Gaming Solutions | GDC 2014
Gratuitous Logo Slide
AWS Gaming Solutions | GDC 2014
Traditional: Rigid AWS: Elastic
Servers
Demand
Capacity
Excess Capacity
Wasted $$
Demand
U...
AWS Gaming Solutions | GDC 2014
Pay As You Scale
AWS Gaming Solutions | GDC 2014
10 Regions
51 CloudFront POPs
Continuous Expansion
Global Is Good
AWS Gaming Solutions | GDC 2014
AWS Gaming Solutions | GDC 2014
Game Backend Concepts
• Think in terms of API's
• Get friends, leaderboard
• HTTP+JSON
• B...
AWS Gaming Solutions | GDC 2014
Core Game Backend
ELB
S3
• Choose Region
• Elastic Load Balancer
• Two Availability Zones
...
AWS Gaming Solutions | GDC 2014
Scale It Way Out
ELB
S3
• Auto Scaling Group
• Capacity on Demand
• Respond to Users
EC2EC...
AWS Gaming Solutions | GDC 2014
Scale It Way Out
ELB
S3
• Auto Scaling Group
• Capacity on Demand
• Respond to Users
• Ela...
AWS Gaming Solutions | GDC 2014
Scale It Way Out
CloudFront
CDN
ELB
S3
EC2EC2EC2
Region
• Auto Scaling Group
• Capacity on...
AWS Gaming Solutions | GDC 2014
Big picture slide
AWS Gaming Solutions | GDC 2014
Elastic Beanstalk
• Managed Container
• Git Push or Zip Upload
• ELB, EC2, RDS
• Web Dashb...
AWS Gaming Solutions | GDC 2014
Hill Of Beans
ELB
S3
• Beanstalk Manages
• ELB
• EC2
• Auto Scaling
• Monitoring
• RDS
• A...
AWS Gaming Solutions | GDC 2014
AWS Gaming Solutions | GDC 2014
More CLI bell
cd MyGameAPI
eb init
eb start
vi app.rb
require 'sinatra'
get '/hello.json' ...
AWS Gaming Solutions | GDC 2014
AWS Gaming Solutions | GDC 2014
Region
Writing Is Painful
Availability
Zone A
Availability
Zone B
S3
EC2
• Games are Write...
AWS Gaming Solutions | GDC 2014
Sharding (Not Fun)
Availability
Zone A
C2
AWS Gaming Solutions | GDC 2014
DynamoDB
Availability
Zone A
Availability
Zone B
S3
• NoSQL Data Store
• Fully-Managed
• H...
AWS Gaming Solutions | GDC 2014
Leaderboard in DynamoDB
• Hash key = Primary key
• Range key = Sub key
• Others attributes...
AWS Gaming Solutions | GDC 2014
Leaderboard with Secondary Indexes
• Create a secondary index!
• Set hash key to Game Leve...
AWS Gaming Solutions | GDC 2014
Python Leaderboard
table = Table('scores', schema=[
HashKey('user'),
RangeKey('level')
],
...
AWS Gaming Solutions | GDC 2014
Big picture slide
AWS Gaming Solutions | GDC 2014
G2 Instance
• NVIDIA Kepler GPU
• Game Streaming
• Rendering Assets
• Build Servers
• AppS...
AWS Gaming Solutions | GDC 2014
C3 Instance
• High packets per second
• Very low latency, jitter
• Intel Ivy Bridge CPU
• ...
AWS Gaming Solutions | GDC 2014
Enhanced Networking (SR-IOV)
Before:
Hypervisor
After:
Hardware
AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
EC2EC2 EC2
Region
• Beanstalk App
• Core Session
• Matchmaking
• ...
AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
...
AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
...
AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
① Login via Beanstalk
② Request Matchmaking
③ Get Game Server IP
...
AWS Gaming Solutions | GDC 2014
Multi-Region Game Servers
E2
Region
EC2
Region
AWS Gaming Solutions | GDC 2014
Big picture slide
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
S3
• Simple Notification Service
• HTTP
• SMS
• Mobile Push
EC2EC2...
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
• Simple Notification Service
• HTTP
• SMS
• Mobile Push
• CloudWa...
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
EC2EC2EC2
Region
EC2EC2
• Simple Notification Service
• HTTP
• SMS...
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
EC2EC2EC2
Region
EC2EC2
• Simple Notification Service
• HTTP
• SMS...
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
EC2EC2EC2
Region
EC2EC2
• Simple Notification Service
• HTTP
• SMS...
AWS Gaming Solutions | GDC 2014
Wrap It Up Already
• Start Simple With Beanstalk
• Go Directly to DynamoDB, Do Not Pass Go...
AWS Gaming Solutions | GDC 2014
Cheers – Nate Wiger @nateware
Upcoming SlideShare
Loading in...5
×

AWS Architecture - GDC 2014

1,818

Published on

Mobile, AAA, and MMO game companies alike are leveraging AWS to build cost-effective, scalable online games. Learn how game studios are using AWS services such as Elastic Beanstalk, DynamoDB, Amazon S3, CloudFront, and ElastiCache to build online games that can scale from 1,000 to 1,000,000 users, while paying only for what they use. Finally, we'll share some thoughts about the future of cloud gaming based on trends we're seeing worldwide.

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,818
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
50
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "AWS Architecture - GDC 2014"

  1. 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. 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
  3. 3. AWS Gaming Solutions | GDC 2014 Gratuitous Logo Slide
  4. 4. AWS Gaming Solutions | GDC 2014 Traditional: Rigid AWS: Elastic Servers Demand Capacity Excess Capacity Wasted $$ Demand Unmet Demand Upset Players Missed Revenue Pay As You Scale
  5. 5. AWS Gaming Solutions | GDC 2014 Pay As You Scale
  6. 6. AWS Gaming Solutions | GDC 2014 10 Regions 51 CloudFront POPs Continuous Expansion Global Is Good
  7. 7. AWS Gaming Solutions | GDC 2014
  8. 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. 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. 10. AWS Gaming Solutions | GDC 2014 Scale It Way Out ELB S3 • Auto Scaling Group • Capacity on Demand • Respond to Users EC2EC2EC2 Region
  11. 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. 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
  13. 13. AWS Gaming Solutions | GDC 2014 Big picture slide
  14. 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
  15. 15. AWS Gaming Solutions | GDC 2014 Hill Of Beans ELB S3 • Beanstalk Manages • ELB • EC2 • Auto Scaling • Monitoring • RDS • Add Other Services • S3 • CloudFront • ElastiCache • SNS EC2 Elastic Beanstalk Container EC2 CloudFront CDN
  16. 16. AWS Gaming Solutions | GDC 2014
  17. 17. AWS Gaming Solutions | GDC 2014 More CLI bell cd MyGameAPI eb init eb start vi app.rb require 'sinatra' get '/hello.json' do {message: "Hello World!"} End git commit –m "app updates" app.rb git aws.push • Initialize everything • Write code • Commit to git • Push to Beanstalk • Coffee / Beer • Repeat
  18. 18. AWS Gaming Solutions | GDC 2014
  19. 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
  20. 20. AWS Gaming Solutions | GDC 2014 Sharding (Not Fun) Availability Zone A C2
  21. 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. 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. 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
  24. 24. AWS Gaming Solutions | GDC 2014 Python Leaderboard table = Table('scores', schema=[ HashKey('user'), RangeKey('level') ], throughput={ 'read': 5, 'write': 15 }, global_indexes=[ GlobalAllIndex('highscore', parts=[ HashKey('level'), RangeKey('score', data_type=NUMBER) ], throughput={ 'read': 5, 'write': 15 } ) ]) new_score = Item(table, data={ 'user': user, 'level': level, 'score': score }) new_score.save() topscores = table.query(index='highscore') for ts in topscores: print(ts['user'], ts['score'])
  25. 25. AWS Gaming Solutions | GDC 2014 Big picture slide
  26. 26. AWS Gaming Solutions | GDC 2014 G2 Instance • NVIDIA Kepler GPU • Game Streaming • Rendering Assets • Build Servers • AppStream!
  27. 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
  28. 28. AWS Gaming Solutions | GDC 2014 Enhanced Networking (SR-IOV) Before: Hypervisor After: Hardware
  29. 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. 30. AWS Gaming Solutions | GDC 2014 Multiplayer Game Servers ① Login via Beanstalk ② Request Matchmaking ③ Get Game Server IP EC2EC2 EC2 Region EC2
  31. 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. 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
  33. 33. AWS Gaming Solutions | GDC 2014 Multi-Region Game Servers E2 Region EC2 Region
  34. 34. AWS Gaming Solutions | GDC 2014 Big picture slide
  35. 35. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB S3 • Simple Notification Service • HTTP • SMS • Mobile Push EC2EC2EC2 Region
  36. 36. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB • Simple Notification Service • HTTP • SMS • Mobile Push • CloudWatch • Monitoring • Alerts EC2EC2EC2 Region EC2 PUB
  37. 37. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB EC2EC2EC2 Region EC2EC2 • Simple Notification Service • HTTP • SMS • Mobile Push • CloudWatch • Monitoring • Alerts • SQS • Background Tasks • Avatar Resizing • Score Processing
  38. 38. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB EC2EC2EC2 Region EC2EC2 • Simple Notification Service • HTTP • SMS • Mobile Push • CloudWatch • Monitoring • Alerts • SQS • Background Tasks • Avatar Resizing • Score Processing
  39. 39. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB EC2EC2EC2 Region EC2EC2 • Simple Notification Service • HTTP • SMS • Mobile Push • CloudWatch • Monitoring • Alerts • SQS • Background Tasks • Avatar Resizing • Score Processing PUB
  40. 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
  41. 41. AWS Gaming Solutions | GDC 2014 Cheers – Nate Wiger @nateware
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×