mobile game architectures on aws (mbl201) | aws re:invent 2013

46
© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc. MBL201 Mobile Game Architectures Nate Wiger, Principal Solutions Architect November 13, 2013

Upload: amazon-web-services

Post on 26-Jan-2015

110 views

Category:

Technology


0 download

DESCRIPTION

The gaming industry is undergoing massive changes, and AWS offers unique capabilities that game developers can use to succeed. In this session, we cover cloud gaming architectural patterns you can use to create highly available and scalable online games. We discuss games-as-APIs, database design considerations, decoupled architectures, and the best instance types for mobile, social, and AAA online games. By the end of this session, you’ll understand the different architecture patterns for the major classes of online games, as well as understand which AWS technologies will help you meet the unique challenges of each one.

TRANSCRIPT

Page 1: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

© 2013 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.

MBL201 Mobile Game Architectures

Nate Wiger, Principal Solutions Architect

November 13, 2013

Page 2: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

What's In It For Me? • Mobile Game Trends • Core Game Backend • Scaling Out • Push Messages • Analytics

Page 3: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

A Few Gaming Customers

Page 4: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Mobile Game Landscape • Free To Play • In-App Purchases • Long-Tail • Cross-Platform • Go Global • User Retention = Revenue

Page 5: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Projected Mobile App Revenue

0100002000030000400005000060000700008000090000

2011 2012 2013 2014 2015 2016 2017

AdsIAPPaid

Source: Gartner

Page 6: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Mobile Online Features • Social Login • Friends • Leaderboards • Push Messages • Content Updates • Analytics

Page 7: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Traditional: Rigid AWS: Elastic

Servers

Demand

Capacity

Excess Capacity Wasted $$

Demand

Unmet Demand Upset Players

Missed Revenue

Pay As You Scale

Page 8: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Pay As You Scale

Page 9: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

9 Regions

25 Availability Zones

Continuous Expansion

Go Global In Minutes

Page 10: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 11: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Mobile Backend Technology • HTTP Based • External Social API's • Save State • Database • Static Data Store • Mobile Push • Analytics

Page 12: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Get It Up

Region

• Choose Region • 9 Globally

• One Availability Zone • Ok for Development • No Redundancy

• EC2 Instance • Linux or Windows • App Server Code

• Elastic Load Balancer • DNS Entry Point

• Database • RDS or DIY Region

ELB

Social API's

Page 13: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Scale It Out

ELB

S3

• Add Another AZ • High Availability • Load Balancing

• Secondary Database • RDS Multi-AZ • Or DIY

• S3 for Game Data • Assets • UGC • Analytics

Region

Page 14: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 15: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Big picture slide

Page 16: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Scale It Way Out

ELB

S3

Region

Page 17: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Scale It Way Out

ELB

S3

• Auto Scaling Group • Capacity on Demand • Respond to Users

EC2 EC2 EC2

Region

Page 18: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Scale It Way Out

ELB

S3

• Auto Scaling Group • Capacity on Demand • Respond to Users

• ElastiCache • Memcache • Redis • Or DIY

EC2 EC2 EC2

Region

Page 19: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Scale It Way Out CloudFront CDN

ELB

S3

EC2 EC2 EC2

Region

• Auto Scaling Group • Capacity on Demand • Respond to Users

• ElastiCache • Memcache • Redis • Or DIY

• CloudFront CDN • DLC, Assets • PUT / POST • Game Saves • UGC

Page 20: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

40+ CloudFront POPs

Europe Amsterdam (2) Dublin Frankfurt (2) London (2) Madrid Milan Paris (2) Stockholm

Asia Chennai Hong Kong (2) Mumbai Osaka Singapore (2) Seoul Sydney Tokyo (2)

South America Sao Paulo

North America Ashburn, VA (2) Dallas, TX (2) Hayward, CA Jacksonville, FL Los Angeles, CA (2) Miami, FL Newark, NJ New York, NY (3) Palo Alto, CA Seattle, WA San Jose, CA South Bend, IN St. Louis, MO

Page 21: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Big picture slide

Page 22: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Big picture slide

Page 23: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Elastic Beanstalk • Managed Container • Git Push or Zip Upload • ELB, EC2, RDS • Web Dashboard • URL Swap Deploys • Same Performance • So Yeah, Use It

Page 24: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

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

Page 25: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 26: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 27: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Region

Writing Is Painful

Availability Zone A

Availability Zone B

Region

S3

EC2

• Games are Write Heavy • Caching of Limited Use • Key Value Key Value • Binary Data • Database = Bottleneck

ELB

EC2

CloudFront CDN

Page 28: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Region

DynamoDB

Availability Zone A

Availability Zone B

Region

S3

• NoSQL Data Store • Fully-Managed • Highly Available • PUT/GET Keys • Provisioned Throughput • Secondary Indexes EC2 EC2

ELB

CloudFront CDN

Page 29: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 30: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Messages and Queues

ELB

S3

• Simple Notification Service • HTTP • SMS • Mobile Push

EC2 EC2 EC2

Region

Page 31: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Messages and Queues

ELB

• Simple Notification Service • HTTP • SMS • Mobile Push

• CloudWatch • Monitoring • Alerts

EC2 EC2 EC2

Region

EC2

PUB

Page 32: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Messages and Queues

ELB

EC2 EC2 EC2

Region

EC2 EC2

• Simple Notification Service • HTTP • SMS • Mobile Push

• CloudWatch • Monitoring • Alerts

• SQS • Background Tasks • Avatar Resizing • Score Processing

Page 33: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Messages and Queues

ELB

EC2 EC2 EC2

Region

EC2 EC2

• Simple Notification Service • HTTP • SMS • Mobile Push

• CloudWatch • Monitoring • Alerts

• SQS • Background Tasks • Avatar Resizing • Score Processing

Page 34: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Messages and Queues

ELB

EC2 EC2 EC2

Region

EC2 EC2

• Simple Notification Service • HTTP • SMS • Mobile Push

• CloudWatch • Monitoring • Alerts

• SQS • Background Tasks • Avatar Resizing • Score Processing

PUB

Page 35: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Big picture slide

Page 36: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

ANALYTICS!

Page 37: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Off The Shelf Analytics • Easy To Integrate • Pre-Baked Reports • Rate Limits • Retention Windows • Data Lock-In

Page 38: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Analytics on AWS

Availability Zone A

Availability Zone B

Region

S3

EC2

• Elastic MapReduce • Managed Hadoop • Parse Logs • Data Cleanup • Aggregation

EC2

Region

CloudFront CDN

ELB

Page 39: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Analytics on AWS

Availability Zone A

Availability Zone B

Region

S3

EC2

• Elastic MapReduce • Managed Hadoop • Parse Logs • Data Cleanup • Aggregation

• Redshift

• Data Warehouse • Column-Oriented • SQL Compatible

EC2

Region

CloudFront CDN

ELB

Page 40: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

• Write File on Device • Periodically Upload to S3 • Nightly Process into Redshift • Point GUI Tool to Redshift

Redshift for Game Analytics

2013-10-24,107,2.53,2134,932 2013-10-29,107,2.73,2211,817 2013-11-02,107,1.95,1833,752 2013-11-04,107,1.44,1121,635 2013-11-05,107,1.76,1411,1032

Page 41: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

• Also Collect Server Logs • Periodically Upload to S3 • Optional Cleanup with EMR • Stick Into Redshift

Redshift for Game Analytics

2013-10-24,107,2.53,2134,932 2013-10-29,107,2.73,2211,817 2013-11-02,107,1.95,1833,752 2013-11-04,107,1.44,1121,635 2013-11-05,107,1.76,1411,1032

EC2

Page 42: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Wrap It Up Already • Free To Play is Here To Stay • Start Small, Scale Out • Elastic Beanstalk • DynamoDB • S3 with CloudFront • SNS Mobile Push • SQS + ElastiCache to Scale • Focus on the Game

Page 43: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

A Few Gaming Sessions • MBL303 – High-Performance Gaming Ops • MBL304 – Red 5's Firefall MMO • MBL305 – Killzone: Shadow Fall • MBL307 – Parse on AWS • MBL308 – SNS Mobile Push

Page 44: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Other Relevant Sessions • DAT101 – Production DynamoDB in an Hour • DAT204 – SmugMug: MySQL to DynamoDB • DAT307 – ElastiCache Deep Dive • DMG204 – Elastic Beanstalk 0-60 • SVC206 – Using SQS to Scale • DAT103 – Intro to Redshift • BDT203 – Analytics with DynamoDB + EMR

Page 45: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013
Page 46: Mobile Game Architectures on AWS (MBL201) | AWS re:Invent 2013

Please give us your feedback on this presentation

As a thank you, we will select prize winners daily for completed surveys!

MBL201