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

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

Upload: others

Post on 27-Nov-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

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

Page 2: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 3: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Traditional: Rigid AWS: Elastic

Servers

Demand

Capacity

Excess Capacity

Wasted $$

Demand

Unmet Demand

Upset Players

Missed Revenue :(

Page 4: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

11 Regions

52 Edge Locations

Continuous Expansion

Page 5: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

关注于游戏设计本身

Page 6: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

ELB

• Choose region

• >=2 Availability Zones

• Amazon EC2 for app

• Elastic Load Balancing

• Amazon RDS database

• Multi-AZ

Region

Page 7: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

• 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

Page 8: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 9: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 10: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

• Games are write heavy

• Caching of limited use

• Key value pair

• Binary structures

• Database = bottleneck

ELB

Region

CloudFront

CDN

Page 11: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

(not fun)

A-ZN-Z

A-H

I-P

Page 12: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

ELB

Region

CloudFront

CDN• Fully-managed

• NoSQL data store

• Provisioned throughput

• Secondary indexes

• PUT/GET keys

• Document Support!

• 400 KB Items

• Auto Scaling (OSS)

Page 13: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

ELB

Region

CloudFront

CDN

Page 14: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

全球部署、快速扩展

“大世界”

高性能、低延迟

资源弹性按需伸缩

MMO实战模拟:武士对决

Page 15: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

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

Page 16: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 17: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

100+ms 100+ms

100+ms100+ms

Page 18: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

1. Game servers

HTTP Game APIs

Page 19: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Tokyo

Oregon

Frankfurt

Virginia

Page 20: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

VPC Subnet

VPC Subnet

Availability Zone A

Availability Zone B

VPC Subnet

VPC Subnet

Auto Scaling group

WEB

VPC Subnet

WEB

JOBS

Page 21: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Region

① Login via HTTP API

② Download Game Assets

③ Matchmaking to Game Server

EC2

EC2

EC2

Page 22: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Region

① Login via HTTP API

② Download Game Assets

③ Matchmaking to Game Server

④ Connect to Server

⑤ Hack Apart Your Friends

⑥ Game Over EC2

EC2

Page 23: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

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

Page 24: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

VPC Private Subnet

VPC Public Subnet

Availability Zone A Availability Zone B

VPC Public Subnet

VPC Private Subnet

GAME GAME GAME GAME GAME GAME

Page 25: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Tokyo

Oregon

Frankfurt

Virginia

?

?

Page 26: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

VPC Subnet

Availability Zone A Availability Zone B

VPC Subnet

Auto Scaling group

WEB WEB

Oregon

Tokyo

VPC SubnetJOBS

Page 27: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 28: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

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

Page 29: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

① Login via API

② Request matchmaking

③ Get game server IP

Region

Page 30: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

① Login via API

② Request matchmaking

③ Get game server IP

④ Connect to server

⑤ Pull down assets

⑥ Other players join

Region

Page 31: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Region A

EC2 API

Region B

EC2 API

Page 32: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

VPC Private Subnet

VPC Public Subnet

Availability Zone A

S3 Bucket

Amazon CloudWatch Logs

GAME GAME GAME

Page 33: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

VPC Private Subnet

VPC Public Subnet

Availability Zone A

AmazonKinesis

S3 Bucket

Amazon Redshift

GAME GAME GAME

Page 34: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

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

http://bit.ly/linux-

tuning

Page 35: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Before:

Hypervisor

After:

Hardware

Page 36: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

Intel® Xeon® v3

• Haswell microarchitecture

• P state and C state control

Page 37: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400
Page 38: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400

game server stateless

Page 39: © 2014 Amazon.com, Inc. and its affiliates. All rights ... · • NoSQL data store • Provisioned throughput • Secondary indexes • PUT/GET keys • Document Support! • 400