© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
アマゾン ウェブ サービス ジャパン株式会社
技術統括本部 ソリューションアーキテクト
森 祐孝
2018/8/2
Gaming on AWS
~ゲームにおけるAWS最新活用術~
Amazon Game Tech Night #7 in Fukuoka
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
自己紹介
森 祐孝(もり ゆうこう)
ソリューションアーキテクト
経歴
• メーカー系SIer、電子マネー運営(サーバサイド開発)
• 独立系SIer
• 情報通信キャリア向けのSIでPL、PM
• コンソール系ゲーム会社(テクニカルディレクター)
• ブラウザソーシャルゲーム、スマートフォン向けソーシャルゲーム
担当
• ソーシャルゲーム、コンソールゲーム系のお客様
• ゲームインダストリ全般
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
https://venturebeat.com/2018/03/19/amazon-powers-cloud-servers-for-90-of-large-game-companies/
More than 90 percent of the world’s largest game companies
use Amazon Web Services, which offloads onliine gaming infrastructure
tasks to Amazon’s giant cloud computing resources.
世界最大のゲーム企業の90%以上(※)がAmazon Web Servicesを利用しており、
オンラインゲームのインフラストラクチャタスクをAmazonの巨大なクラウド
コンピューティングリソース上にオフロードしています。
※newzooが発表した世界のゲーム売上Top25の企業
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWSグローバルインフラストラクチャ
New
18のリージョン, 1のローカルリージョン, 55のアベイラビリティーゾーン, 100+のエッジロケーション
AWS GovCloud (2) ※カッコ内の数はアベイラビリティゾーン
米国西部
オレゴン (3)、北カリフォルニア (3)
米国東部
バージニア北部 (6)、オハイオ (3)
カナダ
中部 (2)
南米
サンパウロ (3)
欧州
アイルランド (3)、フランクフルト (3)、ロンドン (3)、パリ (3)
アジアパシフィック
シンガポール (3)、シドニー (3)、東京 (4)、大阪(1)(*)、ソウル (2)、ムンバイ (2)
中国
北京 (2)、寧夏 (3)
(*) 大阪ローカルリージョン
新しいリージョン (近日追加予定)
バーレーン
中国香港特別行政区
スウェーデン
AWS GovCloud (米国東部)
(As of June, 2018)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
リージョンとAvailability Zone (AZ)
各リージョン内に複数の独立した
AZ(データセンター群)が存在
各AZは互いに影響を受けないよう
に、地理的・電源的・ネットワー
ク的に分離するように設計されて
いる
AZ間は低レイテンシーの高速専用
線で接続されている
http://www.slideshare.net/AmazonWebServices/spot
301-aws-innovation-at-scale-aws-reinvent-2014
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Account Support
Marketplace
Business
Applications
DevOps Tools
Business
Intelligence
Security
Networking
Database &
Storage
SaaS
Subscriptions
Operating
Systems
Mobile
Build, Test,
Monitor Apps
Push
Notifications
Build, Deploy,
Manage APIs
Device Testing
Identity
Enterprise
Applications
Document
Sharing
Email &
Calendaring
Hosted
Desktops
Application
Streaming
Backup
Game
Development
3D Game
Engine
Multi-player
Backends
Mgmt. Tools
Monitoring
Auditing
Service Catalog
Server
Management
Configuration
Tracking
Optimization
Resource
Templates
Automation
Analytics
Query Large
Data Sets
Elasticsearch
Business
Analytics
Hadoop/Spark
Real-time Data
Streaming
Orchestration
Workflows
Managed
Search
Managed ETL
AI
Voice & Text
Chatbots
Machine
Learning
Text-to-Speech.
NLP
Image Analysis
IoT
Rules Engine
Local Compute and
Sync
Device Shadows
Device Gateway
Registry
Hybrid
Devices & Edge
Systems
Data Integration
Integrated
Networking
Resource
Management
VMware on
AWS
Identity
Federation
Migration
Application
Discovery
Application
Migration
Database
Migration
Server
Migration
Data Migration
Infrastructure Regions
Availability
Zones
Points of
Presence
Compute Containers
Event-driven
Computing
Virtual
Machines
Simple Servers Auto Scaling Batch
Web
Applications
Storage Object Storage Archive Block Storage
Managed File
Storage
Exabyte-scale Data
Transport
Database MariaDB
Data
Warehousing
NoSQLAurora MySQL Oracle SQL ServerPostgreSQL
Application
Services
Transcoding Step Functions Messaging
Security
Certificate
Management
Web App.
Firewall
Identity &
Access
Key Storage &
Management
DDoS
Protection
Application
Analysis
Active Directory
Dev Tools
Private Git
Repositories
Continuous
Delivery
Build, Test, and
Debug
Deployment
Networking
Isolated
Resources
Dedicated
Connections
Load Balancing Scalable DNSGlobal CDN
The AWS
Platform
VR
VR/AR
Bare-Metal
Media
Store/Convert
Live
Threat detection
Graph
Analytics
Management
Defender
Managed
Models
Video
Transcribe
Translate
Deep L. Camera
Select
Support
Managed Services
Professional
Services
Partner Ecosystem
Training &
Certification
Solution
Architects
Account
Management
Security & Pricing
Reports
Technical Acct.
Management
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
近年の新サービス/新機能リリース数
2017年は +1,430
95%はお客様からのフィードバックを基に拡充
加速するサービスアップデート
2009
Amazon RDS
Amazon VPC
AWS Auto Scaling
AWS Elastic Load
Balancing
2010
Amazon SNS
AWS Identity
& Access
Management
Amazon
Route 53
2011
Amazon
ElastiCache
Amazon SES
AWS
CloudFormation
AWS Direct
Connect
AWS Elastic
Beanstalk
GovCloud
2012
Amazon SWF
Amazon
Redshift
Amazon
Glacier
Amazon
Dynamo DB
Amazon
CloudSearch
AWS Storage
Gateway
AWS Data
Pipeline
2013
Amazon
CloudTrail
Amazon
CloudHSM
Amazon
WorkSpaces
Amazon
Kinesis
Amazon Elastic
Transcoder
Amazon
AppStream
AWS OpsWorks
2014
AWS KMS
Amazon Config
Amazon Cognito
Amazon Mobile
Analytics
Amazon EC2
Container Service
Amazon RDS
for Aurora
Amazon Lambda
Amazon WorkDocs
AWS Directory
Service
AWS CodeCommit
AWS CodePipeline
2015
Amazon EFS
Amazon API Gateway
Amazon WorkMail
Amazon Machine
Learning
AWS Device Farm
AWS WAF
Amazon
Elasticsearch Service
Amazon QuickSight
AWS Import/Export Snowball
Amazon Kinesis Firehose
Amazon RDS for MariaDB
Amazon Inspector
AWS Database
Migration Service
AWS IoT
Amazon EC2 Container
Registry
Amazon Kinesis Analytics
AWS Mobile Hub
AWS EMR
Amazon CloudWatch
Amazon FPS
AWS Import/Export
Trusted Advisor AWS Service Catalog
AWS CodeDeploy
Amazon CloudWatch Logs
+515
+280
+159
+82
+61
+48
+722
AWS Organizations
Amazon Quicksight
AWS step functions
Amazon Lex
Amazon Polly
Amazon Rekognition
AWS Greengrass
Amazon EC2 elastic GPU
Amazon EC2 FPGA (F1)
Amazon EC2 P2
AWS Batch
Amazon Lightsail
Lambda@Edge
Blox
Aurora with PostgreSQL
compability
AWS codeBuild
AWS X-ray
AWS Snowball Edge
Amazon Pinpoint
AWS Shield
Cloudwatch Events
AWS Glue
Amazon Pinpoint 2016
+1,017
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazonのグローバルネットワーク
冗長化された100GbEによる高速で安全な専用線ネットワーク
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
なぜゲームインフラでAWSを選ぶのでしょうか?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
重いものを持ち上げることはビジネスの中核ではありません
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Game Life Cycle – 高速
• ゲーム業界は日々高速に進歩しています
• アジャイル開発
• 数時間、数日ではなく数分単位でキャパシ
ティとサービスが変動
Time
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Game Life Cycle – AWSはどこをお手伝いできますか?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Game Life Cycle
Planning Dev/Test Retention & Monetize
Next
Launch
ローンチ前 ローンチ ローンチ後
Users
トライ&エラー
CBT
(Closed Beta)
負荷テスト
マーケティング
(Free to Play)
デイリーボーナス
アプリ内
課金
ストアで
フィーチャー
プッシュ通知
次の
展開へ
Time
Acquisition
ストアデザイン
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Traditional: Rigid (柔軟ではない) AWS: Elastic (柔軟)
Servers
負荷
Capacity
過剰なキャパシティ
無駄な投資 $$
負荷
ゲーム需要に対応出来ない
ゲームプレイヤーに不満
売上に影響 :(
ゲームユーザの需要に合わせてサーバをスケール
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
共通的なゲームバックエンドサーバのコンセプト
• クライアントとの通信はAPIで
• HTTP + JSON、gRPC等
• フレンドリスト, リーダボード
• バイナリアセットデータ
• マルチプレイヤーゲーム
• 高可用性
• 拡張性
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region
マルチプレイヤーゲームサーバシステム
• ゲームAPIバックエンドサーバ
• ユーザ認証、管理
• マッチメイキング
• S3+CloudFront
• DLC, アセットファイル
• ゲームセーブデータ
• ユーザ生成コンテンツ
• マルチプレイヤーゲームサーバ
• ダイレクトソケット通信
• プレイヤーに合わせてスケ
ール
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
• 最適なリージョンを選択
• 2つ以上の Availability Zonesで
• アプリ用EC2
• Elastic Load Balancer
• Amazon RDS
• Multi-AZ
Region
ゲームAPIバックエンドサーバ
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
• Amazon Aurora
• Amazonがクラウド時代にあわせて
作ったRDBMS
• MySQL5.6, 5.7, PostgreSQL9.6互換
• 最大64TBまで自動でスケール
• 15台のレプリカ
• 高速なクラッシュリカバリ
• 高速なフェールオーバ
• 秒単位のポイントインタイムリカバリ
Region
ゲームAPIバックエンドサーバ
W RRR
Aurora Cluster
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora
特徴 (http://aws.amazon.com/jp/rds/aurora/)
• MySQL5.6/5.7、PostgreSQL9.6と互換
• 3AZに6本のディスクに書き込み2本のディ
スク障害ではRead/Write可能。3本のディ
スク障害でもRead可能
• キャシュとログをAuroraプロセスから分離
することでAuroraプロセスのリスタートで
もキャッシュが残る
• レプリケーション遅延は10-20ms程
• 64TBまでディスクがシームレスにスケール
する
• 秒単位でのPITR
ゲームでも多數の実績を持つクラウド時代のRDBMS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
Region
CloudFront
CDN
スケールアウト!
• ゲームデータ格納のAmazon S3
• ゲームデータ
• アセット
• ユーザ生成コンテンツ
• ログや分析データ
(データレイク)
• Amazon Cloudfront
• コンテンツ配信
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
Region
CloudFront
CDN
さらなるスケール!
• ゲームデータ格納のAmazon S3
• ゲームデータ
• アセット
• ユーザ生成コンテンツ
• ログや分析データ
• Amazon Cloudfront
• コンテンツ配信
• Auto Scaling Group
• 動的キャパシティ
• ユーザの増加に合わせて
• 計画的な負荷に関してはスケジュール設定
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
Region
CloudFront
CDN
さらなるスケール!
• ゲームデータ格納のAmazon S3
• ゲームデータ
• アセット
• ユーザ生成コンテンツ
• ログや分析データ
• Amazon Cloudfront
• コンテンツ配信
• Auto Scaling Group
• 動的キャパシティ
• ユーザの増加に合わせて
• 計画的な負荷に関してはスケジュール設定
• Amazon ElastiCache
• Memcached & Redis
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ELB
Region
CloudFront
CDN
• ゲームはライトヘビー
• 限界までキャッシング
• キーバリュー型へ変更
(非正規化)
• バイナリストラクチャ
• データベース = ボトルネック
DBの更新頻度が課題に
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
シャーディングは辛い。。
データのJOINが難しい
データの集計をDBを跨いで行う必要がある
同じマスターデータをそれぞれに配置する必要がある
オートインクリメントが使えない
・・・・・
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• フルマネージド
• NoSQL データストア
• プロビジョンドスループット
• セカンダリインデックス
• PUT/GET keys
• TTL サポート
• ドキュメント型のサポート
• 400 KB アイテム
• PITR可能なバックアップ
• Amazon DynamoDB Accelerator
(Cache)
ELB
Region
CloudFront
CDN
Amazon DynamoDB
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon DynamoDBを使ったマイクロサービス構成
AWS
Lambda
Amazon
DynamoDB
Amazon API
Gateway
Amazon
DynamoDB
Stream
AWS
Lambda
Amazon S3
Amazon ES
Amazon
Athena
Amazon
DynamoDB
Query sideOLTP/Command side
1. API Gateway + Lambda + Amazon DynamoDB
コアとなるAPIバックエンドサーバ
2. DynamoDB Streams + AWS Lambda
信頼性の高いイベントドリブンなシステム
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
API Gateway( /games GET - ゲームリスト取得)
DynamoDB Table
“games”
Lambda Function
“getGames”
API GW
/games GET
Response
Request
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
『FINAL FANTASY XV POCKET EDITION』を支える AWS
サーバーレス技術
アプリ内課金のレシート検証システムにサーバレス
を採用し、150か国同時配信にあたりリリース時や
セール時の高負荷にスケールできるシステムを構築。
• API Gateway, Lambda, DynamoDBにより高い
可用性とスケーラビリティを実現したシステムを
少人数・短期間で構築
• データの集計や検索にS3, Athenaを利用
• DynamoDBのバックアップをDataPipelineから
ネイティブのバックアップ/PITRに変更
概要
ポイント
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 導入事例:株式会社スクウェア・エニックスドラゴン
クエストⅩ(思い出アルバム)
ゲーム内で写真撮影し、Lambdaでサムネイル画像作成やコピーライトの追加加工
• 処理時間が数時間→10 数秒で完了
• 同じ処理をオンプレミスと比べ 20 分の 1 程度まで削減
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region
マルチプレイヤーゲームサーバ
① APIを使ったログイン
② マッチメイキング
③ ゲームサーバのIPを取得
REST APIやgRPC(HTTP/2)を
使った接続
マッチメイクに応じて
インスタンスの起動や
サーバアプリの準備を行う
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 2系統のgRPC
• Web APIの役割のステートレスな
gRPC
• ゲームバトルのリアルタイム通信用
ステートフルなgRPC
• CLB(TCPモード)を使った通信
(ローンチ時はNLBが未リリース)
• データの永続化はRedis Cluster
(ElastiCache)とAuroraを利用
• サーバの振り分けはLambda(C#)で実装
事例)黒騎士と白の魔王 –株式会社グラニ様
AWS Summit Tokyo2017
『黒騎士と白の魔王』の gRPC による HTTP/2 API/ストリーミング通信の実践
https://d1.awsstatic.com/events/jp/2017/summit/slide/game-tech/grani.pdf
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region
イベントドリブンアーキテクチャへ
① APIを使ったログイン
② マッチメイキング
③ ゲームサーバのIPを取得
Jobの実行
Job結果
JobをQueueへ
Job結果
時間のかかる処理の場合、
処理のキュー化も検討
Job結果
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
マルチプレイヤーゲームサーバ
① APIを使ったログイン
② マッチメイキング
③ ゲームサーバのIPを取得
④ サーバへ接続
⑤ アセットファイルのダウン
ロード
⑥ 他のプレイヤーとゲームを
プレイ
Region
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A B C
Amazon SNSを用いたPUSHメッセージ
プレイヤー2プレイヤー1
Amazon Simple Notification Service (SNS)
• フルマネージドのPub/Subメッセージサービス
• 異なるサーバのHTTP エンドポイントに対してメッ
セージ送信
• ユーザ間でのメッセージ送信やゲームステータスの
通知などで利用可能
• HTTP エンドポイント以外にもAmazon Simple
Queue Service (SQS) キュー、AWS Lambda 関数
へメッセージを直接Pushも
• モバイルデバイスにプッシュ通知と SMS を送信
Amazon SNS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region
マルチプレイヤーゲームサーバ
① APIを使ったログイン
② マッチメイキング
③ ゲームサーバのIPを取得
④ サーバへ接続
⑤ アセットファイルのダウンロード
⑥ 他のプレイヤーとゲームをプレ
イ
⑦ プレイヤー間でのメッセージ送
信
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region ARegion B
グローバル展開されたマルチプレイヤーゲームサーバ
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PLAYER UNKNOWN’S BATTLEGROUNDS - Bluehole様
特徴
• 1vs99のバトルロイヤルシューティング
• ワールドワイド展開
• 疎結合、マイクロサービスアーキテクチャ
なぜAWSだったのか?
• 単体でスケールできるサービス
(S3, DynamoDB, SQS)
• 主要都市における多数のリージョン
AWSの効果
• 300万同時接続(MCU)を達成
• ゲーム開発者のみで構築・運営
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Region ARegion B
グローバルマルチプレイヤーゲームサーバ
DYNAMODB GLOBAL TABLES
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AMAZON DYNAMODB GLOBAL TABLES
グルーバルに分散してるプレーヤー
Replica (N. America)
Replica (Europe)
Replica (Asia)
Global Table
初のフルマネージド、マルチマスター, マルチリージョンデータベース
高性能でグローバルに分散したアプリケー
ションを構築する
ローカルのテーブルに対して低レイテンシで
読み込みと書き込み
マルチリージョンの冗長性を備えた高い災害
対策
セットアップが簡単で、アプリケーションの
修正は不要
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
コンテナサービスがさらに充実!
EKS(Kubernetesのマネージドサービス)やEC2管理不要な
Fargateでコンテナの実行環境の選択肢が増加
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automating Mother Nature:
How Nexon Used AWS Services to Algorithmically Create and Manage
an In-Game Ecosystem
SlideShare
YouTube
DURANGOのオープンワールドを支えるEcosystem Simulator
21億にもおよぶスロットへの植物の
描画を自然現象に近い形で表現
ECSを採用し、SQS/S3と組み合わせて
非同期のシミュレーション処理を実行
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Ubisoft: How For Honor Runs Using Amazon ECS
4つのポイント
• Fail fast! Succeed Consistently!
• Development ease
• Automation
• Managed Infrastructure
For HonorでのECS/CloudFormation活用事例
・Beanstalk/CouchBaseからECS/ElastiCacheへ
・GitLab CIジョブからCloudFormation
UpdaateStackを実行
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Fortnite – Epic Games様
特徴
• バトルロワイヤルゲーム
• ワールドワイド展開
• クロスプラットフォーム(PS4, Switch, PC, Mobile, etc...)
• Kubernetesによる分析, 機械学習、コンテナアプリケーション
• 9,200万/分・2PB/月のデータ分析
なぜAWSだったのか?
• 1億5,000万人規模のプレイヤーイベント
が実施できるスケーラビリティ
• AWSのマネージドサービス利用によって
ゲーム開発にフォーカスできる
AWSの効果
• 世界中の何百万ものプレイヤーに高品質の
ゲームを提供
• 2018/07/17にAWSへのAll-Inを発表 https://youtu.be/VL6aFvEEFQo?t=17m3s
http://phx.corporate-ir.net/phoenix.zhtml?c=176060&p=irol-newsArticle&ID=2358625
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Global
Infrastructure
& Services
Pre-built
Game Services
& Tools
Content
Creation
Tools
Distribution
&
Marketing
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ゲームにおけるAWS利用の選択肢
MANAGED SERVICESBUILD IT ON YOUR OWN
AMAZON GAMELIFT
Amazon
EC2
Amazon
S3
Amazon
DynamoDB Amazon
Redshift
Amazon CloudFront
Amazon
Kinesis
Full flexibility
Comprehensive
Built On AWS
Fast and Easy
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GameSparks
• リーダーボードやマッチメイキングなど
ゲームに必要な機能をすぐに利用可能
• Test Harnessによる高度なAPIデバッグ
• Cloud Codeによる各イベントアクションの
カスタマイズが可能
• アクティブユーザはDAU/MAUの
ダッシュボードも搭載
特徴
リーダーボード マルチプレイ マッチメイキング、
ロビー、トーナメント
チャット ソーシャル
セキュアでスケーラブルなゲーム向けバックエンドサービス
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
豊富なバックエンド機能
Mobile
PC
Console
Web
Device Management / SDK Layer
First Class Features
Events
Currencies
Leaderboards
Virtual Goods
Teams
Achievements
Core PaaS Layer
Identification
Messaging
Location
Content Mgmt
Real-time Events
Integrations
Management Layer
Analytics Experimentation Manage Screens
OrchestrationLayer
ExistingSystems
1. 拡張性
2. 柔軟性
3. ビルドと実行の双方向けの実装
• ゲームに特化した豊富なサーバサイド機能
• 1つのSDKで全て対応
• 単一の価格構造で全てをカバー
• カスタマイズ可能な最先端の機能群
• リッチな基本機能群と開発環境を提供
• 外部システムとも容易に結合可能
• 開発時間の削減
• 分析とチューニングでプロダクトマネージャーの能
力発揮
• 異なるプレイヤー層へも最大限の楽しさを届けられ
る
Multiplayer Matchmaking Segmentation
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
アナリティクス機能アナリティクス
パワフルなビジュアライズツールで全てをレポートし、分析と実行の時間を短縮
• 全てのカスタムイベントのキャプチャ
• パワフルなOLAPエンジン上で柔軟なレポートを実現
• ビジュアライズツールで様々な角度からレポートの統
合とマッチングが可能
• 既存の外部のBIシステム向けにデータアクセス可能
• GameSparksプラットフォームに完全に統合
• カスタマイズ可能なダッシュボード
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon GameLift
簡単、高速、コスト効果の高いゲームサーバや柔軟な
マッチメイク機能を提供
特徴 (https://aws.amazon.com/jp/gamelift)
• セッションベースのマルチプレイヤーゲーム専用の
ゲームサーバをデプロイ、運用、スケーリングする
サービス
• DDoSプロテクションを装備
• ダウンタイム無しでのライブアップデートが可能
• ポリシーベースの柔軟なマッチメイク(FlexMatch)
• FleetIQによる低コストで可用性の高いゲームサーバ
利用
• Linux/Windowsに対応
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GameLift API Interaction
Game Server
(Deployed)
GameLift
Service
Game Client
APP
AWS SDK
GameLift
Client API
(HTTPs req/res)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
クイックに利用できるフレキシブルなマッチメイキングソリューション
カスタムルールセット
Define スキル、マップ、チームサイズ、その他ご希望
の条件をベースとしたグループマッチメイルールを定
義
満足度の高いマッチメイク
ワールドワイドのプレイヤープールから
パワフルな検索アルゴリズムにより、満足度の高い
マッチメイクを作成
時間経過による待ち時間短縮
マッチメイクのルールを時間の経過とともに緩和する
ことで、競争力と待ち時間のバランスを取ることが可
能
低レイテンシ
カスタム基準をもとにプレイヤーがマッチされ次第、グ
ローバルのキューからベストなロケーションを選択
51
"rules": [{
"name": "FairTeamSkill",
"description": "The average skill of players in each team is within 10 points from the
average skill of players in the match",
"type": "distance",
"measurements": [ "avg(teams[*].players.attributes[skill])" ],
"referenceValue": "avg(flatten(teams[*].players.attributes[skill]))",
"maxDistance": 10
}, {
"name": "EqualTeamSizes",
"description": "Only launch a game when the number of players in each team
matches, e.g. 4v4, 5v5, 6v6, 7v7, 8v8",
"type": "comparison",
"measurements": [ "count(teams[cowboys].players)" ],
"referenceValue": "count(teams[aliens].players)",
"operation": "="
}],
"expansions": [{"target": "rules[FairTeamSkill].maxDistance",
"steps": [{
"waitTimeSeconds": 5,
"value": 50
}, {
"waitTimeSeconds": 15,
"value": 100
}]
}]
FlexMatch
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Alexaのゲームでの事例・Destiny 2 Ghost Skill
「Alexa, ask Ghost to equip my most
powerful weapon.(持ってる中で最強の武器
を装備させて)」
次にすべき事を探す
「Alexa、ゴーストに次は何をすべきか聞いて」
フレンドとのやり取り
「Alexa、ゴーストにバックアップを呼ぶように頼
んで」
• Destiny 2 Ghost Skill
『Destiny 2』用のAlexa Skill
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
まとめ
• AWSでは様々なサービスを用意しております。お客様のシス
テム上の特徴やAWSのサービスの特徴を組み合わせて利用す
ることにより、様々なパターンのゲームインフラを構築する
ことが出来ます。
• 多くのユーザが楽しんでくれるゲームのバックエンドは、
AWSがサポートします!
• 安心しておもしろゲーム、大きなイノベーション生むをゲー
ム開発に集中していただければと思います。
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
参考資料
ゲームの向けのAWS
• https://aws.amazon.com/jp/gaming/
Amazon Game Tech
• https://aws.amazon.com/jp/gametech/
Amazon Game Tech Blog
• https://aws.amazon.com/jp/blogs/gametech/
AWS でのマルチプレイヤーゲームサーバーのパフォーマンス最適化
AWS でスケーラブルなゲームパターンを実装する方法
(Gaming whitepaper)
• https://aws.amazon.com/jp/whitepapers/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ありがとうございました

Gaming on aws 〜ゲームにおけるAWS最新活用術〜

  • 1.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. アマゾン ウェブ サービス ジャパン株式会社 技術統括本部 ソリューションアーキテクト 森 祐孝 2018/8/2 Gaming on AWS ~ゲームにおけるAWS最新活用術~ Amazon Game Tech Night #7 in Fukuoka
  • 2.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 自己紹介 森 祐孝(もり ゆうこう) ソリューションアーキテクト 経歴 • メーカー系SIer、電子マネー運営(サーバサイド開発) • 独立系SIer • 情報通信キャリア向けのSIでPL、PM • コンソール系ゲーム会社(テクニカルディレクター) • ブラウザソーシャルゲーム、スマートフォン向けソーシャルゲーム 担当 • ソーシャルゲーム、コンソールゲーム系のお客様 • ゲームインダストリ全般
  • 3.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. https://venturebeat.com/2018/03/19/amazon-powers-cloud-servers-for-90-of-large-game-companies/ More than 90 percent of the world’s largest game companies use Amazon Web Services, which offloads onliine gaming infrastructure tasks to Amazon’s giant cloud computing resources. 世界最大のゲーム企業の90%以上(※)がAmazon Web Servicesを利用しており、 オンラインゲームのインフラストラクチャタスクをAmazonの巨大なクラウド コンピューティングリソース上にオフロードしています。 ※newzooが発表した世界のゲーム売上Top25の企業
  • 4.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWSグローバルインフラストラクチャ New 18のリージョン, 1のローカルリージョン, 55のアベイラビリティーゾーン, 100+のエッジロケーション AWS GovCloud (2) ※カッコ内の数はアベイラビリティゾーン 米国西部 オレゴン (3)、北カリフォルニア (3) 米国東部 バージニア北部 (6)、オハイオ (3) カナダ 中部 (2) 南米 サンパウロ (3) 欧州 アイルランド (3)、フランクフルト (3)、ロンドン (3)、パリ (3) アジアパシフィック シンガポール (3)、シドニー (3)、東京 (4)、大阪(1)(*)、ソウル (2)、ムンバイ (2) 中国 北京 (2)、寧夏 (3) (*) 大阪ローカルリージョン 新しいリージョン (近日追加予定) バーレーン 中国香港特別行政区 スウェーデン AWS GovCloud (米国東部) (As of June, 2018)
  • 5.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. リージョンとAvailability Zone (AZ) 各リージョン内に複数の独立した AZ(データセンター群)が存在 各AZは互いに影響を受けないよう に、地理的・電源的・ネットワー ク的に分離するように設計されて いる AZ間は低レイテンシーの高速専用 線で接続されている http://www.slideshare.net/AmazonWebServices/spot 301-aws-innovation-at-scale-aws-reinvent-2014
  • 6.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Account Support Marketplace Business Applications DevOps Tools Business Intelligence Security Networking Database & Storage SaaS Subscriptions Operating Systems Mobile Build, Test, Monitor Apps Push Notifications Build, Deploy, Manage APIs Device Testing Identity Enterprise Applications Document Sharing Email & Calendaring Hosted Desktops Application Streaming Backup Game Development 3D Game Engine Multi-player Backends Mgmt. Tools Monitoring Auditing Service Catalog Server Management Configuration Tracking Optimization Resource Templates Automation Analytics Query Large Data Sets Elasticsearch Business Analytics Hadoop/Spark Real-time Data Streaming Orchestration Workflows Managed Search Managed ETL AI Voice & Text Chatbots Machine Learning Text-to-Speech. NLP Image Analysis IoT Rules Engine Local Compute and Sync Device Shadows Device Gateway Registry Hybrid Devices & Edge Systems Data Integration Integrated Networking Resource Management VMware on AWS Identity Federation Migration Application Discovery Application Migration Database Migration Server Migration Data Migration Infrastructure Regions Availability Zones Points of Presence Compute Containers Event-driven Computing Virtual Machines Simple Servers Auto Scaling Batch Web Applications Storage Object Storage Archive Block Storage Managed File Storage Exabyte-scale Data Transport Database MariaDB Data Warehousing NoSQLAurora MySQL Oracle SQL ServerPostgreSQL Application Services Transcoding Step Functions Messaging Security Certificate Management Web App. Firewall Identity & Access Key Storage & Management DDoS Protection Application Analysis Active Directory Dev Tools Private Git Repositories Continuous Delivery Build, Test, and Debug Deployment Networking Isolated Resources Dedicated Connections Load Balancing Scalable DNSGlobal CDN The AWS Platform VR VR/AR Bare-Metal Media Store/Convert Live Threat detection Graph Analytics Management Defender Managed Models Video Transcribe Translate Deep L. Camera Select Support Managed Services Professional Services Partner Ecosystem Training & Certification Solution Architects Account Management Security & Pricing Reports Technical Acct. Management
  • 7.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 近年の新サービス/新機能リリース数 2017年は +1,430 95%はお客様からのフィードバックを基に拡充 加速するサービスアップデート 2009 Amazon RDS Amazon VPC AWS Auto Scaling AWS Elastic Load Balancing 2010 Amazon SNS AWS Identity & Access Management Amazon Route 53 2011 Amazon ElastiCache Amazon SES AWS CloudFormation AWS Direct Connect AWS Elastic Beanstalk GovCloud 2012 Amazon SWF Amazon Redshift Amazon Glacier Amazon Dynamo DB Amazon CloudSearch AWS Storage Gateway AWS Data Pipeline 2013 Amazon CloudTrail Amazon CloudHSM Amazon WorkSpaces Amazon Kinesis Amazon Elastic Transcoder Amazon AppStream AWS OpsWorks 2014 AWS KMS Amazon Config Amazon Cognito Amazon Mobile Analytics Amazon EC2 Container Service Amazon RDS for Aurora Amazon Lambda Amazon WorkDocs AWS Directory Service AWS CodeCommit AWS CodePipeline 2015 Amazon EFS Amazon API Gateway Amazon WorkMail Amazon Machine Learning AWS Device Farm AWS WAF Amazon Elasticsearch Service Amazon QuickSight AWS Import/Export Snowball Amazon Kinesis Firehose Amazon RDS for MariaDB Amazon Inspector AWS Database Migration Service AWS IoT Amazon EC2 Container Registry Amazon Kinesis Analytics AWS Mobile Hub AWS EMR Amazon CloudWatch Amazon FPS AWS Import/Export Trusted Advisor AWS Service Catalog AWS CodeDeploy Amazon CloudWatch Logs +515 +280 +159 +82 +61 +48 +722 AWS Organizations Amazon Quicksight AWS step functions Amazon Lex Amazon Polly Amazon Rekognition AWS Greengrass Amazon EC2 elastic GPU Amazon EC2 FPGA (F1) Amazon EC2 P2 AWS Batch Amazon Lightsail Lambda@Edge Blox Aurora with PostgreSQL compability AWS codeBuild AWS X-ray AWS Snowball Edge Amazon Pinpoint AWS Shield Cloudwatch Events AWS Glue Amazon Pinpoint 2016 +1,017
  • 8.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazonのグローバルネットワーク 冗長化された100GbEによる高速で安全な専用線ネットワーク
  • 9.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. なぜゲームインフラでAWSを選ぶのでしょうか?
  • 10.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 重いものを持ち上げることはビジネスの中核ではありません
  • 11.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Game Life Cycle – 高速 • ゲーム業界は日々高速に進歩しています • アジャイル開発 • 数時間、数日ではなく数分単位でキャパシ ティとサービスが変動 Time
  • 12.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Game Life Cycle – AWSはどこをお手伝いできますか?
  • 13.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Game Life Cycle Planning Dev/Test Retention & Monetize Next Launch ローンチ前 ローンチ ローンチ後 Users トライ&エラー CBT (Closed Beta) 負荷テスト マーケティング (Free to Play) デイリーボーナス アプリ内 課金 ストアで フィーチャー プッシュ通知 次の 展開へ Time Acquisition ストアデザイン
  • 14.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Traditional: Rigid (柔軟ではない) AWS: Elastic (柔軟) Servers 負荷 Capacity 過剰なキャパシティ 無駄な投資 $$ 負荷 ゲーム需要に対応出来ない ゲームプレイヤーに不満 売上に影響 :( ゲームユーザの需要に合わせてサーバをスケール
  • 15.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 共通的なゲームバックエンドサーバのコンセプト • クライアントとの通信はAPIで • HTTP + JSON、gRPC等 • フレンドリスト, リーダボード • バイナリアセットデータ • マルチプレイヤーゲーム • 高可用性 • 拡張性
  • 16.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region マルチプレイヤーゲームサーバシステム • ゲームAPIバックエンドサーバ • ユーザ認証、管理 • マッチメイキング • S3+CloudFront • DLC, アセットファイル • ゲームセーブデータ • ユーザ生成コンテンツ • マルチプレイヤーゲームサーバ • ダイレクトソケット通信 • プレイヤーに合わせてスケ ール
  • 17.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB • 最適なリージョンを選択 • 2つ以上の Availability Zonesで • アプリ用EC2 • Elastic Load Balancer • Amazon RDS • Multi-AZ Region ゲームAPIバックエンドサーバ
  • 18.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB • Amazon Aurora • Amazonがクラウド時代にあわせて 作ったRDBMS • MySQL5.6, 5.7, PostgreSQL9.6互換 • 最大64TBまで自動でスケール • 15台のレプリカ • 高速なクラッシュリカバリ • 高速なフェールオーバ • 秒単位のポイントインタイムリカバリ Region ゲームAPIバックエンドサーバ W RRR Aurora Cluster
  • 19.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Aurora 特徴 (http://aws.amazon.com/jp/rds/aurora/) • MySQL5.6/5.7、PostgreSQL9.6と互換 • 3AZに6本のディスクに書き込み2本のディ スク障害ではRead/Write可能。3本のディ スク障害でもRead可能 • キャシュとログをAuroraプロセスから分離 することでAuroraプロセスのリスタートで もキャッシュが残る • レプリケーション遅延は10-20ms程 • 64TBまでディスクがシームレスにスケール する • 秒単位でのPITR ゲームでも多數の実績を持つクラウド時代のRDBMS
  • 20.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB Region CloudFront CDN スケールアウト! • ゲームデータ格納のAmazon S3 • ゲームデータ • アセット • ユーザ生成コンテンツ • ログや分析データ (データレイク) • Amazon Cloudfront • コンテンツ配信
  • 21.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB Region CloudFront CDN さらなるスケール! • ゲームデータ格納のAmazon S3 • ゲームデータ • アセット • ユーザ生成コンテンツ • ログや分析データ • Amazon Cloudfront • コンテンツ配信 • Auto Scaling Group • 動的キャパシティ • ユーザの増加に合わせて • 計画的な負荷に関してはスケジュール設定
  • 22.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB Region CloudFront CDN さらなるスケール! • ゲームデータ格納のAmazon S3 • ゲームデータ • アセット • ユーザ生成コンテンツ • ログや分析データ • Amazon Cloudfront • コンテンツ配信 • Auto Scaling Group • 動的キャパシティ • ユーザの増加に合わせて • 計画的な負荷に関してはスケジュール設定 • Amazon ElastiCache • Memcached & Redis
  • 23.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ELB Region CloudFront CDN • ゲームはライトヘビー • 限界までキャッシング • キーバリュー型へ変更 (非正規化) • バイナリストラクチャ • データベース = ボトルネック DBの更新頻度が課題に
  • 24.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. シャーディングは辛い。。 データのJOINが難しい データの集計をDBを跨いで行う必要がある 同じマスターデータをそれぞれに配置する必要がある オートインクリメントが使えない ・・・・・
  • 25.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • フルマネージド • NoSQL データストア • プロビジョンドスループット • セカンダリインデックス • PUT/GET keys • TTL サポート • ドキュメント型のサポート • 400 KB アイテム • PITR可能なバックアップ • Amazon DynamoDB Accelerator (Cache) ELB Region CloudFront CDN Amazon DynamoDB
  • 26.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon DynamoDBを使ったマイクロサービス構成 AWS Lambda Amazon DynamoDB Amazon API Gateway Amazon DynamoDB Stream AWS Lambda Amazon S3 Amazon ES Amazon Athena Amazon DynamoDB Query sideOLTP/Command side 1. API Gateway + Lambda + Amazon DynamoDB コアとなるAPIバックエンドサーバ 2. DynamoDB Streams + AWS Lambda 信頼性の高いイベントドリブンなシステム
  • 27.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. API Gateway( /games GET - ゲームリスト取得) DynamoDB Table “games” Lambda Function “getGames” API GW /games GET Response Request
  • 28.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 『FINAL FANTASY XV POCKET EDITION』を支える AWS サーバーレス技術 アプリ内課金のレシート検証システムにサーバレス を採用し、150か国同時配信にあたりリリース時や セール時の高負荷にスケールできるシステムを構築。 • API Gateway, Lambda, DynamoDBにより高い 可用性とスケーラビリティを実現したシステムを 少人数・短期間で構築 • データの集計や検索にS3, Athenaを利用 • DynamoDBのバックアップをDataPipelineから ネイティブのバックアップ/PITRに変更 概要 ポイント
  • 29.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. AWS 導入事例:株式会社スクウェア・エニックスドラゴン クエストⅩ(思い出アルバム) ゲーム内で写真撮影し、Lambdaでサムネイル画像作成やコピーライトの追加加工 • 処理時間が数時間→10 数秒で完了 • 同じ処理をオンプレミスと比べ 20 分の 1 程度まで削減
  • 30.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region マルチプレイヤーゲームサーバ ① APIを使ったログイン ② マッチメイキング ③ ゲームサーバのIPを取得 REST APIやgRPC(HTTP/2)を 使った接続 マッチメイクに応じて インスタンスの起動や サーバアプリの準備を行う
  • 31.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • 2系統のgRPC • Web APIの役割のステートレスな gRPC • ゲームバトルのリアルタイム通信用 ステートフルなgRPC • CLB(TCPモード)を使った通信 (ローンチ時はNLBが未リリース) • データの永続化はRedis Cluster (ElastiCache)とAuroraを利用 • サーバの振り分けはLambda(C#)で実装 事例)黒騎士と白の魔王 –株式会社グラニ様 AWS Summit Tokyo2017 『黒騎士と白の魔王』の gRPC による HTTP/2 API/ストリーミング通信の実践 https://d1.awsstatic.com/events/jp/2017/summit/slide/game-tech/grani.pdf
  • 32.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region イベントドリブンアーキテクチャへ ① APIを使ったログイン ② マッチメイキング ③ ゲームサーバのIPを取得 Jobの実行 Job結果 JobをQueueへ Job結果 時間のかかる処理の場合、 処理のキュー化も検討 Job結果
  • 33.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. マルチプレイヤーゲームサーバ ① APIを使ったログイン ② マッチメイキング ③ ゲームサーバのIPを取得 ④ サーバへ接続 ⑤ アセットファイルのダウン ロード ⑥ 他のプレイヤーとゲームを プレイ Region
  • 34.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. A B C Amazon SNSを用いたPUSHメッセージ プレイヤー2プレイヤー1 Amazon Simple Notification Service (SNS) • フルマネージドのPub/Subメッセージサービス • 異なるサーバのHTTP エンドポイントに対してメッ セージ送信 • ユーザ間でのメッセージ送信やゲームステータスの 通知などで利用可能 • HTTP エンドポイント以外にもAmazon Simple Queue Service (SQS) キュー、AWS Lambda 関数 へメッセージを直接Pushも • モバイルデバイスにプッシュ通知と SMS を送信 Amazon SNS
  • 35.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region マルチプレイヤーゲームサーバ ① APIを使ったログイン ② マッチメイキング ③ ゲームサーバのIPを取得 ④ サーバへ接続 ⑤ アセットファイルのダウンロード ⑥ 他のプレイヤーとゲームをプレ イ ⑦ プレイヤー間でのメッセージ送 信
  • 36.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region ARegion B グローバル展開されたマルチプレイヤーゲームサーバ
  • 37.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PLAYER UNKNOWN’S BATTLEGROUNDS - Bluehole様 特徴 • 1vs99のバトルロイヤルシューティング • ワールドワイド展開 • 疎結合、マイクロサービスアーキテクチャ なぜAWSだったのか? • 単体でスケールできるサービス (S3, DynamoDB, SQS) • 主要都市における多数のリージョン AWSの効果 • 300万同時接続(MCU)を達成 • ゲーム開発者のみで構築・運営
  • 38.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Region ARegion B グローバルマルチプレイヤーゲームサーバ DYNAMODB GLOBAL TABLES
  • 39.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AMAZON DYNAMODB GLOBAL TABLES グルーバルに分散してるプレーヤー Replica (N. America) Replica (Europe) Replica (Asia) Global Table 初のフルマネージド、マルチマスター, マルチリージョンデータベース 高性能でグローバルに分散したアプリケー ションを構築する ローカルのテーブルに対して低レイテンシで 読み込みと書き込み マルチリージョンの冗長性を備えた高い災害 対策 セットアップが簡単で、アプリケーションの 修正は不要
  • 40.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. コンテナサービスがさらに充実! EKS(Kubernetesのマネージドサービス)やEC2管理不要な Fargateでコンテナの実行環境の選択肢が増加
  • 41.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Automating Mother Nature: How Nexon Used AWS Services to Algorithmically Create and Manage an In-Game Ecosystem SlideShare YouTube DURANGOのオープンワールドを支えるEcosystem Simulator 21億にもおよぶスロットへの植物の 描画を自然現象に近い形で表現 ECSを採用し、SQS/S3と組み合わせて 非同期のシミュレーション処理を実行
  • 42.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Ubisoft: How For Honor Runs Using Amazon ECS 4つのポイント • Fail fast! Succeed Consistently! • Development ease • Automation • Managed Infrastructure For HonorでのECS/CloudFormation活用事例 ・Beanstalk/CouchBaseからECS/ElastiCacheへ ・GitLab CIジョブからCloudFormation UpdaateStackを実行
  • 43.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Fortnite – Epic Games様 特徴 • バトルロワイヤルゲーム • ワールドワイド展開 • クロスプラットフォーム(PS4, Switch, PC, Mobile, etc...) • Kubernetesによる分析, 機械学習、コンテナアプリケーション • 9,200万/分・2PB/月のデータ分析 なぜAWSだったのか? • 1億5,000万人規模のプレイヤーイベント が実施できるスケーラビリティ • AWSのマネージドサービス利用によって ゲーム開発にフォーカスできる AWSの効果 • 世界中の何百万ものプレイヤーに高品質の ゲームを提供 • 2018/07/17にAWSへのAll-Inを発表 https://youtu.be/VL6aFvEEFQo?t=17m3s http://phx.corporate-ir.net/phoenix.zhtml?c=176060&p=irol-newsArticle&ID=2358625
  • 44.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Global Infrastructure & Services Pre-built Game Services & Tools Content Creation Tools Distribution & Marketing
  • 45.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ゲームにおけるAWS利用の選択肢 MANAGED SERVICESBUILD IT ON YOUR OWN AMAZON GAMELIFT Amazon EC2 Amazon S3 Amazon DynamoDB Amazon Redshift Amazon CloudFront Amazon Kinesis Full flexibility Comprehensive Built On AWS Fast and Easy
  • 46.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. GameSparks • リーダーボードやマッチメイキングなど ゲームに必要な機能をすぐに利用可能 • Test Harnessによる高度なAPIデバッグ • Cloud Codeによる各イベントアクションの カスタマイズが可能 • アクティブユーザはDAU/MAUの ダッシュボードも搭載 特徴 リーダーボード マルチプレイ マッチメイキング、 ロビー、トーナメント チャット ソーシャル セキュアでスケーラブルなゲーム向けバックエンドサービス
  • 47.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 豊富なバックエンド機能 Mobile PC Console Web Device Management / SDK Layer First Class Features Events Currencies Leaderboards Virtual Goods Teams Achievements Core PaaS Layer Identification Messaging Location Content Mgmt Real-time Events Integrations Management Layer Analytics Experimentation Manage Screens OrchestrationLayer ExistingSystems 1. 拡張性 2. 柔軟性 3. ビルドと実行の双方向けの実装 • ゲームに特化した豊富なサーバサイド機能 • 1つのSDKで全て対応 • 単一の価格構造で全てをカバー • カスタマイズ可能な最先端の機能群 • リッチな基本機能群と開発環境を提供 • 外部システムとも容易に結合可能 • 開発時間の削減 • 分析とチューニングでプロダクトマネージャーの能 力発揮 • 異なるプレイヤー層へも最大限の楽しさを届けられ る Multiplayer Matchmaking Segmentation
  • 48.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. アナリティクス機能アナリティクス パワフルなビジュアライズツールで全てをレポートし、分析と実行の時間を短縮 • 全てのカスタムイベントのキャプチャ • パワフルなOLAPエンジン上で柔軟なレポートを実現 • ビジュアライズツールで様々な角度からレポートの統 合とマッチングが可能 • 既存の外部のBIシステム向けにデータアクセス可能 • GameSparksプラットフォームに完全に統合 • カスタマイズ可能なダッシュボード
  • 49.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Amazon GameLift 簡単、高速、コスト効果の高いゲームサーバや柔軟な マッチメイク機能を提供 特徴 (https://aws.amazon.com/jp/gamelift) • セッションベースのマルチプレイヤーゲーム専用の ゲームサーバをデプロイ、運用、スケーリングする サービス • DDoSプロテクションを装備 • ダウンタイム無しでのライブアップデートが可能 • ポリシーベースの柔軟なマッチメイク(FlexMatch) • FleetIQによる低コストで可用性の高いゲームサーバ 利用 • Linux/Windowsに対応
  • 50.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. GameLift API Interaction Game Server (Deployed) GameLift Service Game Client APP AWS SDK GameLift Client API (HTTPs req/res)
  • 51.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. クイックに利用できるフレキシブルなマッチメイキングソリューション カスタムルールセット Define スキル、マップ、チームサイズ、その他ご希望 の条件をベースとしたグループマッチメイルールを定 義 満足度の高いマッチメイク ワールドワイドのプレイヤープールから パワフルな検索アルゴリズムにより、満足度の高い マッチメイクを作成 時間経過による待ち時間短縮 マッチメイクのルールを時間の経過とともに緩和する ことで、競争力と待ち時間のバランスを取ることが可 能 低レイテンシ カスタム基準をもとにプレイヤーがマッチされ次第、グ ローバルのキューからベストなロケーションを選択 51 "rules": [{ "name": "FairTeamSkill", "description": "The average skill of players in each team is within 10 points from the average skill of players in the match", "type": "distance", "measurements": [ "avg(teams[*].players.attributes[skill])" ], "referenceValue": "avg(flatten(teams[*].players.attributes[skill]))", "maxDistance": 10 }, { "name": "EqualTeamSizes", "description": "Only launch a game when the number of players in each team matches, e.g. 4v4, 5v5, 6v6, 7v7, 8v8", "type": "comparison", "measurements": [ "count(teams[cowboys].players)" ], "referenceValue": "count(teams[aliens].players)", "operation": "=" }], "expansions": [{"target": "rules[FairTeamSkill].maxDistance", "steps": [{ "waitTimeSeconds": 5, "value": 50 }, { "waitTimeSeconds": 15, "value": 100 }] }] FlexMatch
  • 52.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. Alexaのゲームでの事例・Destiny 2 Ghost Skill 「Alexa, ask Ghost to equip my most powerful weapon.(持ってる中で最強の武器 を装備させて)」 次にすべき事を探す 「Alexa、ゴーストに次は何をすべきか聞いて」 フレンドとのやり取り 「Alexa、ゴーストにバックアップを呼ぶように頼 んで」 • Destiny 2 Ghost Skill 『Destiny 2』用のAlexa Skill
  • 53.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. まとめ • AWSでは様々なサービスを用意しております。お客様のシス テム上の特徴やAWSのサービスの特徴を組み合わせて利用す ることにより、様々なパターンのゲームインフラを構築する ことが出来ます。 • 多くのユーザが楽しんでくれるゲームのバックエンドは、 AWSがサポートします! • 安心しておもしろゲーム、大きなイノベーション生むをゲー ム開発に集中していただければと思います。
  • 54.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 参考資料 ゲームの向けのAWS • https://aws.amazon.com/jp/gaming/ Amazon Game Tech • https://aws.amazon.com/jp/gametech/ Amazon Game Tech Blog • https://aws.amazon.com/jp/blogs/gametech/ AWS でのマルチプレイヤーゲームサーバーのパフォーマンス最適化 AWS でスケーラブルなゲームパターンを実装する方法 (Gaming whitepaper) • https://aws.amazon.com/jp/whitepapers/
  • 55.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ありがとうございました