SlideShare a Scribd company logo
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
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
AWS Gaming Solutions | GDC 2014
Gratuitous Logo Slide
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
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
•  Binary asset data
•  Mobile push
•  Multiplayer servers
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
AWS Gaming Solutions | GDC 2014
Scale It Way Out
ELB
S3
•  Auto Scaling Group
•  Capacity on Demand
•  Respond to Users
EC2EC2EC2
Region
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
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
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 Dashboard
•  Same Performance
•  So Yeah, Use It
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
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'	
  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
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 Heavy
•  Caching of Limited Use
•  Key Value Key Value
•  Binary Structures
•  Database = Bottleneck
ELB
EC2
CloudFront
CDN
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
•  Highly Available
•  PUT/GET Keys
•  Secondary Indexes
•  Provisioned Throughput
•  Auto Scaling
EC2 EC2
ELB
CloudFront
CDN
Elastic Beanstalk Container
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?
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
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'])	
  
	
  
AWS Gaming Solutions | GDC 2014
Big picture slide
AWS Gaming Solutions | GDC 2014
G2 Instance
•  NVIDIA Kepler GPU
•  Game Streaming
•  Rendering Assets
•  Build Servers
•  AppStream!
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
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
•  Public Server Tier
•  Direct Client Socket
•  Scale on Players
•  CloudFront CDN
•  DLC, Assets
•  Game Saves
•  UGC
EC2
AWS Gaming Solutions | GDC 2014
Multiplayer Game Servers
①  Login via Beanstalk
②  Request Matchmaking
③  Get Game Server IP
EC2EC2 EC2
Region
EC2
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
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
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
EC2EC2EC2
Region
AWS Gaming Solutions | GDC 2014
Messages and Queues
ELB
•  Simple Notification Service
•  HTTP
•  SMS
•  Mobile Push
•  CloudWatch
•  Monitoring
•  Alerts
EC2EC2EC2
Region
EC2
PUB
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
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
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
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
AWS Gaming Solutions | GDC 2014
Cheers – Nate Wiger @nateware

More Related Content

What's hot (20)

PDF
Amazon Aurora 100% 활용하기
Amazon Web Services Korea
 
PDF
C# Game Server
lactrious
 
PPTX
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
강 민우
 
PDF
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
Heungsub Lee
 
PDF
중앙 서버 없는 게임 로직
Hoyoung Choi
 
PPTX
나의 이직 이야기
종립 이
 
PDF
SAT Problem (2015.02.25)
Jaehyun Koo
 
PDF
Python 게임서버 안녕하십니까 : RPC framework 편
준철 박
 
PPTX
마비노기듀얼 이야기-넥슨 김동건
강 민우
 
PDF
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
SORACOM, INC
 
PDF
NEXT.JS
Binumon Joseph
 
PPTX
모션 워핑
sung suk seo
 
PDF
Iocp advanced
Nam Hyeonuk
 
PPT
Level Design Challenges & Solutions - Mirror's Edge
Electronic Arts / DICE
 
PPTX
React js
Oswald Campesato
 
PDF
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
devCAT Studio, NEXON
 
PDF
NDC12_Lockless게임서버설계와구현
noerror
 
PDF
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
강 민우
 
PDF
게임 디자이너와 게임 서버
ByungChun2
 
PDF
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
Amazon Web Services Korea
 
Amazon Aurora 100% 활용하기
Amazon Web Services Korea
 
C# Game Server
lactrious
 
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
강 민우
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
Heungsub Lee
 
중앙 서버 없는 게임 로직
Hoyoung Choi
 
나의 이직 이야기
종립 이
 
SAT Problem (2015.02.25)
Jaehyun Koo
 
Python 게임서버 안녕하십니까 : RPC framework 편
준철 박
 
마비노기듀얼 이야기-넥슨 김동건
강 민우
 
なぜソーシャルゲームはクラウドなのか? ~AWSの成功事例を紐解く~
SORACOM, INC
 
모션 워핑
sung suk seo
 
Iocp advanced
Nam Hyeonuk
 
Level Design Challenges & Solutions - Mirror's Edge
Electronic Arts / DICE
 
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
devCAT Studio, NEXON
 
NDC12_Lockless게임서버설계와구현
noerror
 
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
강 민우
 
게임 디자이너와 게임 서버
ByungChun2
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
Amazon Web Services Korea
 

Similar to Scalable Gaming with AWS - GDC 2014 (20)

PDF
AWS Game Analytics - GDC 2014
Nate Wiger
 
PDF
Gaming in the Cloud at Websummit Dublin
Ian Massingham
 
PDF
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar
 
PDF
AWS Summit Seoul 2015 - 일본 AWS 게임 고객사례 - Gungho, Grani, Nintendo를 중심으로
Amazon Web Services Korea
 
PPTX
re:Invent re:cap 2020
Kaushik Mohanraj
 
PDF
GDC 2015 - Game Analytics with AWS Redshift, Kinesis, and the Mobile SDK
Nate Wiger
 
PDF
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
Seungmin Shin
 
PDF
AWS Cloud Development Kit (CDK)를 이용한 코드 기반 인프라 개발 및 배포 - 공찬호(리얼리티매직) :: AWS C...
AWSKRUG - AWS한국사용자모임
 
PPTX
Building a scalable API with Grails
Tanausu Cerdeña
 
PPTX
Write retrogames in the web and add something more with Azure
Marco Parenzan
 
PDF
AWS vs Azure vs Google (GCP) - Slides
TobyWilman
 
PPTX
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
Tom Kerkhove
 
PPTX
KGC 2013 AWS Keynote
Amazon Web Services Korea
 
PDF
GDC 2015 - Low-latency Multiplayer Gaming with AWS
Nate Wiger
 
PDF
Serverless Culture
AWS User Group Bengaluru
 
PDF
DevOpsDays Galway 2017 - Skypilot Project
Thomas Shaw
 
PDF
Aws-What You Need to Know_Simon Elisha
Helen Rogers
 
PPTX
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Jinwoong Kim
 
PDF
Mobile game architecture on GCP
명근 최
 
PDF
201507131408448146
Mason Mei
 
AWS Game Analytics - GDC 2014
Nate Wiger
 
Gaming in the Cloud at Websummit Dublin
Ian Massingham
 
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar
 
AWS Summit Seoul 2015 - 일본 AWS 게임 고객사례 - Gungho, Grani, Nintendo를 중심으로
Amazon Web Services Korea
 
re:Invent re:cap 2020
Kaushik Mohanraj
 
GDC 2015 - Game Analytics with AWS Redshift, Kinesis, and the Mobile SDK
Nate Wiger
 
[KGC 2012] Online Game Server Architecture Case Study Performance and Security
Seungmin Shin
 
AWS Cloud Development Kit (CDK)를 이용한 코드 기반 인프라 개발 및 배포 - 공찬호(리얼리티매직) :: AWS C...
AWSKRUG - AWS한국사용자모임
 
Building a scalable API with Grails
Tanausu Cerdeña
 
Write retrogames in the web and add something more with Azure
Marco Parenzan
 
AWS vs Azure vs Google (GCP) - Slides
TobyWilman
 
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
Tom Kerkhove
 
KGC 2013 AWS Keynote
Amazon Web Services Korea
 
GDC 2015 - Low-latency Multiplayer Gaming with AWS
Nate Wiger
 
Serverless Culture
AWS User Group Bengaluru
 
DevOpsDays Galway 2017 - Skypilot Project
Thomas Shaw
 
Aws-What You Need to Know_Simon Elisha
Helen Rogers
 
Cloud Native 오픈소스 서비스 소개 및 Serverless로 실제 게임 개발하기
Jinwoong Kim
 
Mobile game architecture on GCP
명근 최
 
201507131408448146
Mason Mei
 
Ad

Recently uploaded (20)

PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Ad

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
  • 3. AWS Gaming Solutions | GDC 2014 Gratuitous Logo Slide
  • 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. AWS Gaming Solutions | GDC 2014 Pay As You Scale
  • 6. AWS Gaming Solutions | GDC 2014 10 Regions 51 CloudFront POPs Continuous Expansion Global Is Good
  • 7. AWS Gaming Solutions | GDC 2014
  • 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
  • 13. AWS Gaming Solutions | GDC 2014 Big picture slide
  • 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. 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. AWS Gaming Solutions | GDC 2014
  • 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. AWS Gaming Solutions | GDC 2014
  • 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. AWS Gaming Solutions | GDC 2014 Sharding (Not Fun) Availability Zone A C2
  • 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
  • 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. AWS Gaming Solutions | GDC 2014 Big picture slide
  • 26. AWS Gaming Solutions | GDC 2014 G2 Instance •  NVIDIA Kepler GPU •  Game Streaming •  Rendering Assets •  Build Servers •  AppStream!
  • 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. AWS Gaming Solutions | GDC 2014 Enhanced Networking (SR-IOV) Before: Hypervisor After: Hardware
  • 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
  • 33. AWS Gaming Solutions | GDC 2014 Multi-Region Game Servers E2 Region EC2 Region
  • 34. AWS Gaming Solutions | GDC 2014 Big picture slide
  • 35. AWS Gaming Solutions | GDC 2014 Messages and Queues ELB S3 •  Simple Notification Service •  HTTP •  SMS •  Mobile Push EC2EC2EC2 Region
  • 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. 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. 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. 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. 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. AWS Gaming Solutions | GDC 2014 Cheers – Nate Wiger @nateware