aws 游戏行业解决方案 游世界... · pdf filewindows powershell and python ......

54
AWS中国(北京)区域由光环新网运营 .游世界 AWS 游戏行业解决方案 赵霏,AWS解决方案架构师 Zhao Fei, Solutions Architect, Amazon Web Services

Upload: tranthien

Post on 16-Feb-2018

308 views

Category:

Documents


15 download

TRANSCRIPT

Page 1: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

云.游世界

AWS 游戏行业解决方案

赵霏,AWS解决方案架构师Zhao Fei, Solutions Architect, Amazon Web Services

Page 2: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

从6位游戏开发者开始

全球卖座第1的手游

游戏每日活跃数量(DAU)超过1亿

日收入超过600万美元

每天10TB游戏日志存入AWS S3

Page 3: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Page 4: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

“……易用性强、性能强大且稳定可靠,同时还需要这个云服务有高扩展性,能适应游戏用户的高速增长……在这种情况下,我们选择了亚马逊的AWS。 ” - Sami Yliharju

Services Lead of SuperCell

日进600万美元背后的秘密

Page 5: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

无大量前期投资按需付费低成本

高可靠性

运维容易 高扩展性 创新专注于游戏

全球扩展

游戏开发者需要什么样平台

Page 6: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

AWS全球基础设施

Page 7: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Glu Mobile 全球部署 + 快速部署

US-West (Oregon)

EU(Frankfurt)

ASIA PAC (Tokyo)

SOUTH America (Sao Paulo)

ASIA PAC (Singapore)

ASIA PAC (Sydney)

US-EAST(Virginia)

China (Beijing)

游戏应用

Page 8: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

无前期投资,按照用量付费

资源浪费

客户不满

实际需求

预计需求

僵化的传统方式 AWS弹性方式

实际需求

AWS

Page 9: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Ubisoft育碧软件 - 构建游戏而非服务器前期投资低, 加速产品面市

刺客信条、孤岛惊魂和舞力全开的开发商 Ubisoft, 通过使用AWS的敏捷性

在18月内推出了10款游戏,最高峰期在8周内推出5款

即使是像Ubisoft这么大型的游戏公司,也不想将大量人力和财力,花在前期投资上。

Page 10: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

缩短产品进入市场时间: 快速组建

Region

• 选择区域(Region)

• 使用一个高可用区(AZ)

• 足够研发使用• 无需冗余设计

• EC2实例• Linux 或 Windows

• 游戏服务器代码• 弹性负载均衡(ELB)

• 数据库• RDS 或 使用EC2搭建

Region

ELB

Availability

Zone A

Page 11: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

AWS 管理控制台

Page 12: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Command Line Interface (CLI)Windows Powershell and Python

on Linux

Software Development Kits (SDK)

.NET, Java, PHP, Ruby, Node.js

REST API

AWS Console (GUI)

API

使用 AWS API 自动化运维

Android iOS Java nodeJS .NET PHP Python Ruby

Eclipse Visual Studio CLI Powershell

可编程实现

广泛的开发工具集

Page 13: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Tap4Fun

2011: Tap4Fun 在成都成立

Island Empire Galaxy Empire Global Threat Galaxy LegendSpartan WarsKing’s Empire

Page 14: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

2013

Page 15: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

2014 使用 AWS API 自动化运维

带来改变可视化所有平台资源,监控使用率, 稳定性和可用性-- AWS API 收集所有云资源信息

Page 16: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

简化流程, 提高自动化

带来改变现在,我们启动一个实例, 更加自动化,节省更多的时间,更安全。

Page 17: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

快速增长

挑战• 提高可用性/减少宕机

• 支撑快速增长

• 减少发展瓶颈

高可靠性

高扩展性

Page 18: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

CMUNE - 超级突击队 (UberStrike)

• 多人在线射击游戏(MMOFPS)

• 3D 页游 / 手游• 超过一百万的世界玩家同台竞技

• 完全基于AWS云

Page 19: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

提高可用性 - 减少延迟, 断线和宕机

• 增加另外一个高可用区(AZ)

• 高可用性设计• 负载均衡

• 辅助数据库• RDS Multi-AZ设计• 自行构建

ELB

S3

Region

Availability

Zone A

Availability

Zone B

Page 20: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

DevSisters - 自动伸缩应对访问高峰

24小时之内,随着服务量的变化,EC2的2台实例扩展至60台并收缩回2台。

Page 21: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

自动扩展 (Auto Scaling) — 高扩展性随需应变

• 自动扩展组(Auto Scaling Group)

• 自动伸缩应对访问高峰• 随需设计容量• 根据用户量反馈• 自动故障恢复

ELB

S3

Region

Availability

Zone A

Availability

Zone B

EC2 EC2EC2

Page 22: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

性能提升– 高增长带来的潜在瓶颈

ELB

S3

• 挑战• 关系型数据库在高

I/O压力下会破坏游戏的整体表现

• ElastiCache

• 自行构建• Memcached/Redis

EC2EC2EC2

Region

Availability

Zone A

Availability

Zone B

Page 23: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

全球快速内容分发

• 以快速且低成本的方式,更新版本,推送大量数据及可下载内容至客户端

CloudFront

CDN

ELB

S3

EC2EC2EC2

Region

Availability

Zone A

Availability

Zone B

Page 24: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

DevSisters – AWS整体架构

Page 25: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Region

令人头疼的“写”操作

Availability

Zone A Availability

Zone B

Region

S3

EC2

挑战• 游戏应用的“写”操作相对密集• 缓存的效用有限• Key/Value

• 数据库成为整个系统瓶颈

ELB

EC2

CloudFront

CDN

Availability

Zone A

Availability

Zone B

Page 26: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

分片是好的解决方式吗

Page 27: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

DynamoDB: 扩展NoSQL数据库

CloudFront

CDN

ELB

S3

EC2EC2EC2

Region

Availability

Zone A

Availability

Zone B

由AWS完全管理,以服务形式提供给用户的高可用NoSQL数据库

存储自动扩展: 数据存储无上限

快速: 采用SSD技术

- average reads < 5ms

- average write < 10ms

预设吞吐量: 可配置性能,为无限扩展设计

容错机制: 在若干可用区中复制数据

Page 28: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

DynamoDB: 海量中保持低延迟

Docs, SDK's: http://aws.amazon.com/dynamodb/developer-resources/

Auto Scaling Your DynamoDB: https://github.com/sebdah/dynamic-

dynamodb

<10ms

Page 29: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Halfbrick <Fruit Ninja 水果忍者>

两周之内月活跃用户从100万升至800万

普通数据库无法支持如此快速的系统压力增长

Halfbrick Studios 使用AWS的DynamoDB 和多个高可用区来支撑<水果忍者>数以百万计的用户

Page 30: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

当用户达到百万量级

当用户达到百万量级,前面所提起的一些服务都会派上用场

Multi-AZ 多可用区

Elastic Load Balancing 弹性负载均衡

Auto Scaling 自动扩展

Caching off DB 数据库的缓存服务

S3/CloudFront 高效内容存储和分发

Service-oriented architecture (SOA) 面向服务的架构

同时AWS有更多服务支持海量级应用

NoSQL DynamoDB, Hadoop EMR, Data Warehouse Redshift

Page 31: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

当用户超过百万

Availability Zone

Amazon

Route 53User

Amazon S3

Amazon

Cloudfront

Availability Zone

Elastic Load

Balancing

DynamoDB

RDS DB Instance

Read Replica

App

Instance

App

Instance

App

Instance

ElastiCache RDS DB Instance

Read Replica

App

InstanceApp

Instance

App

Instance

ElastiCacheRDS DB Instance

Standby (Multi-AZ)RDS DB Instance

Active (Multi-AZ)

Page 32: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

游戏分析

Page 33: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

AWS SDK

Put* APIs

LOG4J

Flume

Fluentd

AWS SDK

Get* APIs

Kinesis Client Library

+

Connector Library

Apache

Storm

Amazon Elastic

MapReduce

发送 消费

AWS Mobile

SDK

Kinesis

Producer

Library

AWS Lambda

Apache

Spark

实时数据收集

AW

S En

dp

oin

t

Availability

Zone

Shard 1

Shard 2

Shard N

Availability

ZoneAvailability

Zone

Page 34: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

无需服务器就可以运行代码. 按照代码运行的计算时间来计费.

通过事件触发或直接调用:

• 上传文件至Amazon S3 bucket

• 更新Amazon DynamoDB表中的记录

• 调用 Amazon API Gateway 终端节点

• 移动应用后台调用

• 以及许多…

更简单的完成:

• 实时的数据流处理

• 构建可扩展的后端服务

• 服务间的协同工作

AWS LAMBDA –无服务器架构的计算

AWS GAMING

Page 35: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

在云中托管的Hadoop 集群Amazon EMR

可扩展 Hadoop 集群即服务

Hadoop、Hive、Spark、Presto、Hbase 等

易于使用,完全托管

按需、预留和竞价

HDFS、Amazon EBS 和 S3 文件系统

端到端安全性Amazon EMR

Page 36: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

PB级数据仓库服务Redshift

“Redshift查询比Hive快20倍”

“以前几个小时的查询现在只需要几秒”

“Redshift性能比任何数据仓库都要好”

“我们团队使用完Redshift的感受是:太XXX棒了. 无索引的复杂查询只需要10秒”

“我有说过它超乎寻常的快吗? 我们已经立刻准备用它来替换Hadoop”

“使用Redshift, 我们看到了2倍以上的查询性能提升”

Channel “我们通常用它来处理几十亿级别的数据集”

Leader Node

Page 37: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

实时数据流处理 & 海量数据存储大数据分析

Amazon Kinesis

Lambda

S3

聚合数据预处理数据

Glacier

归档

Hadoop

数据挖掘

实时趋势分析表

仪表盘

Workers

实时数据流

Redshift

商务智能BI

游戏玩家的数量虚拟货币的使用量热门道具…

Page 38: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

电子竞技营收

Page 39: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Twitch

• 游戏行业的社交化视频直播平台

的领导者

• 帮助构建强大的用户社

• 通过玩家进行传播

• 这款游戏是否值得去玩?

• 怎么能够玩的更好?100M unique viewers / month

106 minutes / person / day

2M peak concurrent viewers

Page 40: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

交互流程

Broadcaster

AudienceGame

2

31

Page 41: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Twitch 的集成

Twitch ChatPlay

允许玩家通过聊天的方式影响游戏

Twitch JoinIn

主播可以邀请观众直接参与游戏

Page 42: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

一款 完全免费的AAA级游戏引擎 并且深度集成 AWS

and Twitch – 同时开放全部源码

Page 43: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Amazon Lumberyard 引擎

• 基于成熟的 CryEngine 构建

引擎

• 基于Double Helix Games的

框架系统

• 集成 AWS 的云服务

• Full integration with与

Twitch 深度集成

• 使用完全免费!

Page 44: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Amazon Lumberyard – 跨平台部署

PC PlayStation 4,

Xbox One

Android, iOS

Virtual Reality

Page 45: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Complex outdoor environments with lighting

Page 46: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营High Definition Rendering in real-time for

characterss

Page 47: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营Meet “Rin” – Rendered real-time in Lumberyard

Page 48: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Amazon Lumberyard – 编辑器

• IDE that allows live

Visual Editing

• 提供 “Gems” 支持 模块化 开发

• 提供 2D & UI 设计器

• Entity & Component framework

• Visual scripting via Flow Graph

Page 49: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Cloud Canvas

• 集成在Lumberyard中,可直接访问AWS 资源 的工具

• Storage, Database, Compute,

Identity, Queuing, Notification

• 已集成在 FlowGraph 中可以轻松的使用Virtual Scripting

• Lumberyard 会帮助处理所有的与AWS

的后端交互行为

Page 50: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Cloud Canvas – Details

• AWS 基础元素 for Cloud

Canvas

• DynamoDB, S3, SNS,

Cognito, SQS, Lambda

• Script 或 FlowGraph 进行调用

• 整合AWS C++ SDK

Amazon

DynamoDB

Amazon

S3

Amazon

Lambda

Amazon

Cognito

Amazon

SNS

Amazon

SQS

Page 51: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Page 52: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Page 53: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

开启你的“云游”之旅!

Page 54: AWS 游戏行业解决方案 游世界... · PDF fileWindows Powershell and Python ... Eclipse Visual Studio CLI Powershell ... 可视化所有平台资源,监控使用率,

AWS中国(北京)区域由光环新网运营

Thank You!