© 2014 amazon.com, inc. and its affiliates. all rights ... · • nosql data store • provisioned...

Post on 27-Nov-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© 2014 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.

Traditional: Rigid AWS: Elastic

Servers

Demand

Capacity

Excess Capacity

Wasted $$

Demand

Unmet Demand

Upset Players

Missed Revenue :(

11 Regions

52 Edge Locations

Continuous Expansion

关注于游戏设计本身

ELB

• Choose region

• >=2 Availability Zones

• Amazon EC2 for app

• Elastic Load Balancing

• Amazon RDS database

• Multi-AZ

Region

• 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

• RDS read-replica

ELB

Region

CloudFront

CDN

• Games are write heavy

• Caching of limited use

• Key value pair

• Binary structures

• Database = bottleneck

ELB

Region

CloudFront

CDN

(not fun)

A-ZN-Z

A-H

I-P

ELB

Region

CloudFront

CDN• Fully-managed

• NoSQL data store

• Provisioned throughput

• Secondary indexes

• PUT/GET keys

• Document Support!

• 400 KB Items

• Auto Scaling (OSS)

ELB

Region

CloudFront

CDN

全球部署、快速扩展

“大世界”

高性能、低延迟

资源弹性按需伸缩

MMO实战模拟:武士对决

http://bit.ly/verizon-latencyhttp://bit.ly/superdata-latency

100+ms 100+ms

100+ms100+ms

1. Game servers

HTTP Game APIs

Tokyo

Oregon

Frankfurt

Virginia

VPC Subnet

VPC Subnet

Availability Zone A

Availability Zone B

VPC Subnet

VPC Subnet

Auto Scaling group

WEB

VPC Subnet

WEB

JOBS

Region

① Login via HTTP API

② Download Game Assets

③ Matchmaking to Game Server

EC2

EC2

EC2

Region

① Login via HTTP API

② Download Game Assets

③ Matchmaking to Game Server

④ Connect to Server

⑤ Hack Apart Your Friends

⑥ Game Over EC2

EC2

Region

① Login via HTTP API

② Download Game Assets

③ Matchmaking to Game Server

④ Connect to Server

⑤ Hack Apart Your Friends

⑥ Game Over

⑦ Write via HTTP APIEC2

EC2

VPC Private Subnet

VPC Public Subnet

Availability Zone A Availability Zone B

VPC Public Subnet

VPC Private Subnet

GAME GAME GAME GAME GAME GAME

Tokyo

Oregon

Frankfurt

Virginia

?

?

VPC Subnet

Availability Zone A Availability Zone B

VPC Subnet

Auto Scaling group

WEB WEB

Oregon

Tokyo

VPC SubnetJOBS

Region

• Game API backend pods

• Core session

• Matchmaking

• S3+CloudFront

• DLC, assets

• Game saves

• UGC

• Game server pod(public subnet)

• Direct client socket

• Scale on players

① Login via API

② Request matchmaking

③ Get game server IP

Region

① Login via API

② Request matchmaking

③ Get game server IP

④ Connect to server

⑤ Pull down assets

⑥ Other players join

Region

Region A

EC2 API

Region B

EC2 API

VPC Private Subnet

VPC Public Subnet

Availability Zone A

S3 Bucket

Amazon CloudWatch Logs

GAME GAME GAME

VPC Private Subnet

VPC Public Subnet

Availability Zone A

AmazonKinesis

S3 Bucket

Amazon Redshift

GAME GAME GAME

http://bit.ly/ec2-enhanced-net

http://bit.ly/linux-

tuning

Before:

Hypervisor

After:

Hardware

Intel® Xeon® v3

• Haswell microarchitecture

• P state and C state control

game server stateless

jennysun@amazon.com

top related