SlideShare uma empresa Scribd logo
1 de 70
Baixar para ler offline
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.1
雲上的遊戲伺服器
Operation for your Game Servers
營運秘笈
Elina Lin| BDM | 2020/4/23
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.2
AWS 如何計費?
按實際使用量付費
按實際使用量付費的模式讓您可以輕鬆適
應不斷變化的業務需求,無需投入過多預
算,同時還可提高您對變化的響應能力。
採用按實際使用量付費的模式,您可以根
據實際需求而非預測來調整業務,從而降
低容量過度預配置或不足的風險
通過預留容量節約成本
對於有些服務,如 Amazon EC2 和
Amazon RDS,您可以購買預留容量。
與使用等量按需容量相比,使用預留實例
可節省高達 75% 的費用。購買預留實例
時,預付金額越高,享受的折扣就越大。
使用越多,付費越少
對於 AWS,您可以享受基於使用量的折
扣,且使用量越大,節省的資金越多。對
於 S3 之類的服務而言,分級定價意味著
使用量越大,為每 GB 支付的費用就越少。
AWS 還為您提供了各種服務採購選項,
以幫助滿足您的業務需求。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.3
AWS 省錢秘笈
第一式 :量體裁衣
Right-Sizing your Game
Servers
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.4
AWS 提供最具廣度和深度的伺服器類型選擇
全方位滿足您對遊戲服性價比的追求
分類 能力 選項
275種實例類型
超過
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.5
案例:網易《荒野行動》在海外部署遇到的性能挑戰
《荒野行動》海外版一周年數據:
全球營收 4.5 億+ 美元
全球註冊用戶 2.5 億+
全球下載量 5800 萬+
2018年初 Intel Spectre & Meltdown 漏洞爆發,AWS 跟進修復
修復漏洞後 c3/c4/m3/m4 等系列性能損失,最高降低 50%(網路密集型業務)
荒野行動日服春節人數創新高,但遭遇 CPU 網卡軟中斷性能瓶頸
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.6
荒野行動每日服務
增加機器數量
Irq affinity 提升 50%
開啟 RPS/RFS 提升 40%
仍無法滿足不斷新高的需求
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.7
將伺服器取代為使用 Nitro System
的 C5 系列,徹底解決問題!
C4 系列
C5 系列
將原來使用的 C4 列號取代為 C5 系列,
取代比例 2 : 1
成本節省 42%
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.8
網路加速
(混合架構)
新加坡區域 美東區域
東京區域
Chat
Payment
Log DB
Game
s
proxy1 proxy2
game1 game2 game3
manager... ...
... ... ... ...
東南亞玩家 東亞玩家 歐美玩家
除了遊戲伺服器, 用於處理網路請求為主的伺服器,還有進一步提升性價比的空間
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.9
AWS Graviton2 Processor
全球首款在公有雲上可用的 Arm 處理
器
基於 64-bit Arm Neoverse 核心,AWS
設計的晶片,7 nm 製程
最高可達 16 vCPUs,10 Gbps 增強網路,
3.5 Gbps EBS 頻寬
基於 64-bit Arm Neoverse 核心,AWS 設
計的晶片,16 nm 製程
最高可達 64 vCPUs,25 Gbps 增強網
路,18 Gbps EBS 頻寬
與上一代相比,7 倍的性能,4 倍的核心
數,5 倍的記憶體速度
Graviton 處理器
(A1 列)
Graviton2 處理器
(M6g, R6g, C6g 系欄位)
基於 AWS Graviton2 處理器的全新一代 Arm 架構實體,相比目前的 x86 架構實體,性價比提升 40% !
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.10
• 網路效能:A1 ≈ C5 > C4
• 成本:A1 < C5 < C4
• 比 C5 節省 40% 成本
• 比 C4 節省 49% 成本
網路效能對比測試:A1 非常適合於網路密集型工作負載
Instance
Type
CPU
&Memory
NIC
Queue
Cost
($ per hour)
a1.large 2core 4GB 1 0.051
c4.large 2core 3.75GB 2 0.10
c5.large 2core 4GB 2 0.085
a1.xlarge 4core 8GB 1 0.102
c4.xlarge 4core 7.5GB 2 0.199
c5.xlarge 4core 8GB 4 0.17
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0
100
200
300
400
500
600
Network Bandwidth (internal, Gbps)
a1.large c4.large c5.large a1.xlarge c4.xlarge c5.xlarge
PPS (K per second)
a1.large c4.large c5.large a1.xlarge c4.xlarge c5.xlarge
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.11
AWS 省錢秘笈
第二式 :活用彈性
Make good use of Elasticity
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.12
傳統方式:預置的遊戲伺服器
執行的伺服器數量
實際需要的伺服器數量
(線上人數變化導致)
容量
存在較多空閒的
資源,浪費成本
資源不滿足實際需要
用戶體驗到遊戲卡頓、延遲
用戶流失,遊戲收入下降
遊戲伺服器的彈性伸縮程度,極大地影響著使用者的遊戲
體驗以及成本的節約程度
彈性伸縮的遊戲伺服器架構
需求
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.13
Amazon
GameLift
 玩家符合引擎:讓您便捷地自定義玩家匹配邏輯,在網
路延遲和競爭性之間做出最佳平衡。
Amazon GameLift
 工作階段自動分配:自動在全球各個 AWS 區域中選取
離玩家最近的地方放置遊戲會話,極大降低網路延遲。
 自動彈性伸縮:自動對遊戲服集群進列容量的延伸
與收縮,確保您只對實際需要使用的資源付費。
 輕鬆實現全球同服:通過 API 輕鬆接入,免除自行構
建全球同服游戲後端服務的繁重工作。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.13
遊戲客戶端
遊戲客戶端
遊戲客戶端
遊戲客戶端
後端接入
服務
玩家資料
(例如:等級、隊伍)
玩家資料
網路延遲
對話分配
隊列
遊戲伺服器
群集(東京)
遊戲伺服器
群集(新加坡)
遊戲伺服器
群集(美東)
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.14
Amazon GameLift 的
彈性伸縮機制
• 為您的遊戲伺服器自動維持一個指定水平
的會話可用性;
• 跟蹤資源充足度,自動增減伺服器;
• 可根據您遊戲的需要,配置自動彈性伸縮規
則;
• 彈性伸調整規則可根據以下指標進行設定:
 玩家平均等待時間
 玩家工作階段數量
 遊戲工作階段數量
 可用的實體數量
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.15
Amazon GameLift – 遊戲工作階段狀態追蹤
即時追蹤遊戲伺服器集群中的遊戲工作階段狀態
向下要檢視玩家工作階段時狀態
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.16
2.5 億+
1000 萬+
全球
註冊玩家
同時
在線人數
Epic Games 基於 AWS 全球基礎
設施,為玩家提供優質的遊戲體驗
Epic Games 使用了 AWS 一系列的服務來滿
足遊戲運行的需要,資源彈性支援從高峰期 10
倍於一般時段的負載量,到全網 2 億玩家共同參
與的大型活動。
- Chris Dyl, Director of Platform at Epic Games
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.17
AWS 省錢秘笈
第三式 :預留容量
Reserve Capacity to get Discount
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.18
Amazon EC2 的購買選項
競價實體(Spot)
搶到就賺,用完就撤
變廢為寶, 要的就是便宜
預留實體
長期持有,批發路線
物美價廉,小康之家
依需實體
即買即用,零售路線
價格最貴,有錢任性
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.19
混合使用不同類型的實體到最佳成本優化效果!
適合用競價實體(Spot)的場景:
• 微服務架構(遊戲平臺/中心伺服器)
• 大數據處理和分析(數據伺服器)
• 低至 1 折
適合使用按需實例的場景:
• 有狀態的遊戲,無法預測使用時間(如:活動
突增,公休日突增,測試中......)
• 標準定價,按使用時長計費
適合使用預留實例的場景:
• 穩定性要求高,且已知需要長期使用的伺服器,
如:資料庫伺服器,傳統平臺/中心伺服器等
• 低至 4 折
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.20
我不確定不同區域的伺服器數量會如何變化,
也不保證伺服器配置不會變化,
那就沒法通過預留實例來省錢了嗎?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.21
新增定價模式: Savings Plans
新靈活定價模型,可協助您節省多達 72% 的
EC2 和 Fargate 用量花費。 客戶只需承諾在
1 年或 3 年內固定的服務用量(例如每小時 10
美元),即可獲得該用量對應的折扣。 而該折扣
可自動應用於全球所有區域和所有的實例類型。
每種計算類型都有一個 "On-Demand" 價
格和 "Savings Plans" 價格。 如果客戶承
諾每小時支付 10 美元的計算使用費,那麼他
們將最高有 10 美元的用量適用 "Savings
Plans" 折扣價格。 超出承諾範圍的任何用
量將按常規 "On-Demand" 收費。
它是如何工作的?這是什麼?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.22
Singapore Oregon Ireland
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
Saving Plans 舉例
原來:全部 On Demand 計費,$60K/month
...... ...... ......
10K/month 40K/month 10K/month
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.23
Singapore Oregon Ireland
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
買了一個 $30K/month 的 Savings Plan – 自動應用折扣最優的實體
...... ...... ......
10K/month 40K/month 10K/month
Savings Plans 30K/month
7 折
6.8 折
7.2 折
7.1 折 7.3 折
7.5 折
6.9 折
6.6 折
7.1 折
7.1 折 7.2 折
7.3 折
7.1 折
7 折
7.8 折
7.5 折 7.7 折
7.6 折
白色部分為原折扣較低的實體,未被Saving Plans匹配到的狀況下
以原本On-demand的費用計費
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.24
Singapore Oregon Ireland
c4.xlarge
c5.2xlarge m5.4xlarge
c4.xlarge t2.medium
r5.8xlarge c3.2xlarge
c5.2xlarge
t2.medium
r5.8xlarge c3.2xlarge
若實際使用的實體數量變化、調整型號或者進行區域性增減調整
Savings Plan 自動重新符合,確保最大程度覆蓋和利用
...... ......
Savings Plans 30K/month
On Demand
6.9 折, 5K
6.6 折, 5K
6.9 折, 5K
6.9 折, 5K 6.9 折, 5K
On Demand 7 折, 5K
On Demand
On Demand
On Demand
平均 7 折,復原後可覆蓋 $43K On Demand 費用
調整後,假設若全部 On Demand,總消費為 $50K/month
Savings Plan 自動覆蓋後,月消費為 $37K
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.25
AWS 省錢秘笈
第四式 :Spot 實體
Use Spot Instance Whenever you Can
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.26
Spot 範例的簡單規則
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.27
價格變化基於各資源池對於短期容量的長期的供需關係—沒
有你想像的那麼交替
只需要為申請的資源按市場價定價,市場價不高於你的定價。
無需競價
只有滿足按需請求時,才會被中斷。 不會因有人出價更高而
回收實體資源
Spot 實體中的重要概念(續)
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.28
擔心 Spot 實例隨時被中斷?
在過去的3月中, 95% 的實體中斷來自客戶手動
停止實體, 因為應用程式已完成其工作
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.29
好像很複雜的樣子……
如何將 Spot 用於遊戲伺服器?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.30
GameLift FleetIQ
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
 持續跟踪 Spot 實體中斷率,據此自動將游
戲會話放置到具有最低中斷率的 Spot 實體
 中斷率進一步降低(低於 1%)
 通過 Spot 實體進一步節省遊戲伺服器成本
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.31
GameLift FleetIQ:遊戲會話放置實例選擇流程
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
Step 1:選擇玩家網絡延遲最低
的區域
Latency = 20ms Latency = 60ms
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.32
GameLift FleetIQ:遊戲會話放置實例選擇流程
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
Step 2:計算實體的風險係數,
排除風險係數較高的實體
Latency = 20ms Latency = 60ms
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.33
GameLift FleetIQ:遊戲會話放置實例選擇流程
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
Step 3:選擇成本最低的實體
Latency = 20ms Latency = 60ms
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.34
GameLift FleetIQ:遊戲會話放置實例選擇流程
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
首選的區域沒有空閒資源了?
Latency = 20ms Latency = 60ms
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.35
GameLift FleetIQ:遊戲會話放置實例選擇流程
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
切換到最近的另一個區域,實體
選擇邏輯同上
Latency = 20ms Latency = 60ms
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.36
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
如果所有區域都沒有空閒資源了
怎麼辦?
GameLift FleetIQ:遊戲會話放置實例選擇流程
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.37
US-WEST-2 Region
Placement
Queue
US-EAST-1 Region
AWS CloudAWS Cloud
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
Spot
C5.large
Spot
C5.xlarge
Spot
C5.2xlarge
On-demand
C5.large
AWS Cloud
Game
services
Game clients
FlexMatch
Amazon GameLift
放置到最優區域,最優成本,正在
運行但是有中斷風險的實例上
GameLift FleetIQ:遊戲會話放置實例選擇流程
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.38
“Ubisoft 致力於通過難忘的原創遊戲體驗豐富玩家的
生活。在For Honor 上,使用Amazon GameLift 雲遊
戲服務器可使我們遵守這一承諾。使用FleetIQ Spot
實例,我們可以提供無縫、可擴展的玩家體驗,在每
一百萬次遊戲會話中,受到中斷影響的遊戲會話不到
一次。”
Laurent Chouinard, Online Programming Lead,
Ubisoft
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.39
“在Behaviour Interactive 公司,玩家體驗是第一位
的。這也是我們將Dead by Daylight 的專用服務器
委託給Amazon GameLift 的原因。使用FleetIQ
Spot 實例,在2500萬次遊戲會話中,我們的中斷率
僅為0.00033%,這有助於我們集中精力為玩家帶來
令人興奮的全新功能,而只需對基礎設施進行很少
的維護。””
Fadi Beyrouti, Head of Technology,
Behaviour Interactive
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.40
關心完成本 那麼來談談安全
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.41
遊戲後端安全面臨重重挑戰
如 果 你 是 一 個 遊 戲 開 發 者 或 運 維 人 員 , 那 麼 你 需 要 考 慮 後 端 安 全 性 。
癱 瘓 遊 戲 服 務 資 源 、 識 別 玩 家 個 人 資 訊 和 帳 戶 憑 據 、 以 及 對 遊 戲 玩
法 進 行 作 弊 對 於 做 惡 的 人 來 說 是 有 價 值 的 。
為 了 不 使 環 境 暴 露 于 惡 意 軟 體 或 駭 客 的 攻 擊 之 下 , 需 要 多 層 次 採 用
安 全 管 理 、 分 析 異 常 狀 況 、 進 而 使 遊 戲 處 於 健 康 的 狀 態 。
運維人員須耗費大量精力在海量的玩家日誌中分
辨不合法行為並對敏感性資料進行保護
遊戲伺服器數量龐大,易有未打補丁的系統漏洞
被惡意入侵時對遊戲服造成性能低落
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.42
遊戲常見的安全問題,DDoS攻擊,威脅檢測,資料隱私,作弊監測
都可以透過AWS服務獲得解決方案
雲原生的遊戲安全防禦
42
資料隱私
通過惡意軟體竊取帳戶
資訊,然後通過更改密
碼將玩家的頂級裝備被
出售或轉移到駭客擁有
的另一個帳戶以便稍後
出售。
遊戲作弊威脅檢測
駭客通過未打補丁的系統
漏洞或非法侵入,入侵到
內部網絡,並逐漸接近重
要伺服器,遊戲重要資料
流程失 。
DDOS攻擊
(分散式拒絕服務)
攻擊者通常將會發送看似
有效但並非由實際玩家生
成的流量。 可能會損壞
玩家的體驗。 抵禦這些
攻擊對於保護玩家體驗和
信任您的品牌非常重要。
駭客通過社交工程/木馬
程式,對正常使用的內部
主機種下後門,造成遊戲
原始程式碼或使用者個人
資料洩露。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.43 43
DDos攻擊的安全防禦
DDos Attack Security Defense
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.44
44
普通玩家 遊戲用戶端
玩家資料訪問
配對和會話發現
連接到遊戲伺服器
會話請求
請求操作 - 登錄,
遊戲會話,配對等
遊戲會話結果和玩家技能更新
玩家資料庫後臺服務
伺服器
資料中心
會話存儲會話發現/
管理伺服器
遊戲伺服器
攻擊者 被控制的
設備
攻擊者 被控制的設備
會話資料
訪問
DDoS典型的攻擊遊戲伺服器方式
會以無法有效處理的流量作為目標,從而影響遊戲的可用或性能
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.45 45
容易受到 DDoS 攻擊影響的遊戲服務
後臺服務
Backend Service
遊戲服務
Game Service
 使用者認證
 會話發現
 排行榜
 匹配系統
 遊戲伺服器
 即時遊戲會話
 遊戲代理伺服器
 隊伍
 文字 & 語音聊天
 內容分發
特別是功能服務層的聊天,商城, NPC ,錢
包,道具,排行榜,使用者資料等全域服務
受到影響時使使用者體驗不佳
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.46 46
資料
Data
7
應用層
資料傳輸協議
資料
Data
6
展示層
資料格式與加密
資料
Data
5
工作階段層
開始、控制和結束會話
段
Segments
4
傳輸層
端到端的網路資料流程
資料單位 層
包
Packets
3
網路層
源和終點之間建立連接
幀
Frames
2
資料連結層
單個鏈路上如何傳輸資料
比特
Bits
1
實體層
將資訊編碼成電或者光
反射型 UDP 攻擊占了遊戲類型
DDoS 攻擊的 55%
針對遊戲服的DDos攻擊常見落在網路層,難發起應用層攻擊
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.47 47
使攻擊面最小化
ELB
創建 DMZ 區,將攻擊阻擋在外層
並通過 Security Group 限定進入流量
SSH Bastion NAT Gateway
自動擴展應對攻擊
保護暴露的資源
Web Application Firewall 檢測並過
濾應用層流量 HTTP & HTTPS
Edge location Route 53
對攻擊制訂對應策略
AWS Shield
WAF
ELB CloudWatch
定制 AWS WAF 規則 ,
SQLi, XSS, 限速機制 , 黑名
單
通過自動擴展與快速分佈的資源,將
攻擊威力分散與減弱
對服務正常的行為模式瞭若指掌 , 對
於異常狀況就能快速反應
針對 HTTP Flood, AWS 提供的 DDoS 防禦戰略
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.48 4848
遊戲玩家
Amazon
CloudFront
Amazon
Route53
Elastic Load
Balancing
DDoS 攻擊
 DDoS 防禦能力已內置集成到 AWS 的網路服務
(CloudFront, Route53, ELB)無需額外費用。
 DDoS 防禦一直開啟,快速抵禦,無需人工干預或進行外
部路由;
 充分利用 AWS 資料中心的冗余互聯網連接和超高頻寬;
 自動抵禦最常見的攻擊,如:SYN/ACK 泛洪、UDP 泛洪、
反射攻擊等;在每個進入點提供高容量緩解。
 與傳統的方法相比,AWS Shield 可以提供延遲優勢。 為
了為您的遊戲應用程式提供最佳覆蓋範圍。
AWS 全球基礎架構
已內置 DDoS 防禦能力(AWS Shield)
AWS Shield
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.49 4949
 攻擊通知:通過 Amazon CloudWatch 即時監控與通知
攻擊,針對攻擊取證和資料包捕獲。
 自動保護:防止最常見的 SYN / ACK泛洪,UDP泛洪,
反射攻擊等 L3/4 和L7 DDoS 保護。
 DRT 團隊:全天候 DDoS 回應小組 DDoS Response
Team (DRT),定制化的緩解策略來説明保護遊戲應用
程式的可用性。 許多遊戲應用程式需要用戶端軟體來生成
具有可預測模式的流量。 DRT可以構建根據您的遊戲邏輯
量身定制的緩解措施,並保護最有可能來自實際玩家的流
量。
 帳單保護:AWS 承擔因為 DDoS攻 擊產生的相關資源成
本
如果希望更加全面的緩解DDoS 攻擊,
可以訂閱AWS Shield Advanced
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.50
50
 AWS WAF 是一個託管的第七層網路攻擊檢測和抵禦服務,
它監控所有的 HTTP/S 請求,保護 Web 應用,設定注入攻
擊規矩(協力廠商規矩或白名單),抵禦惡意攻擊;
 藉由AWS WAF,您可以保護遊戲的Web應用程式元件(如
登錄頁面,應用內購買或API)應用程式層威脅或Web請求
氾濫
 AWS WAF允許定自義匹配條件,並將這些條件組合到一個 ,
也可以使用基於速率的規則來臨時阻止符合指定條件的IP位
址,並以過高的速率訪問應用程式。
 使用AWS Firewall Manager來管理AWS WAF規則和AWS
Shield Advanced受保護的資源。 這樣,即使添加了新資源,
也可以確保整個應用程式都由一組標準策略覆蓋 。
AWS WAF
Web應用程式防火牆
White List
Black List
SQL Injection
XSS
HTTP Flood
Scanner & Probes
IP Reputation Lists
Bad Bot
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.51 5151
 遊戲伺服器在多個地區運行,對於來自世界各地的玩家,通常都要求一致的表現
 Global Accelerator是在遊戲伺服器前部署的網路層服務,以加快遊戲玩家訪問遊戲服的速度,並提升可
用性和性能
 Global Accelerator使用AWS全球網路,功能包括靜態任播IP位址、 智慧流量分配、 增強的容錯能力、
TCP和UDP協定支援、 即時區域容錯移轉,並自動集成于AWS Shield ,可在攻擊到達遊戲服前過濾
AWS Global Accelerator + AWS Shield ,將DDoS攻擊防禦在邊
緣端
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.52 52
遊戲用戶端
獨立的遊
戲伺服器
(5.6.7.8)
AWS Cloud
Region A
獨立的游
戲伺服器
(9.10.11.12)
遊戲用戶端
攻擊者 獨立的遊
戲伺服器
(1.2.3.4)
Amazon
GameLif
t
Fleet
Amazon GameLift 將嘗
試放置會話,直到伺服
器已滿或無回應
一旦 Amazon GameLift 檢
測到 Fleet 中的會話數量較
少,它將添加另一個實例。
Game Lift
的解決方案
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.53
遊戲如何做威脅檢測
How games do threat detection
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.54
灰 色 軟 體 是 一 種 執 行 意 外 操 作 或 未 授 權 操 作 的 程 式 、 用 於 指 代
間 諜 軟 體 、 廣 告 軟 體 、 撥 號 程 式 、 惡 作 劇 程 式 、 遠 端 存 取 工 具
和 任 何 其 他 不 受 歡 迎 的 檔 和 程 式
具 有 一 定 程 度 風 險 性 的 灰 色 軟 體
無 法 簡 單 的 用 黑 與 白 名 單 來 區 分
這 就 是 威 脅 檢 測 。
駭客通過灰色軟體滲透攻擊安全性漏洞,竊取使用者私隱資
訊如信用卡等,國際許多知名遊戲帳號系統都曾遭受大規模
攻擊
駭客對遊戲進行逆向工程破解,複製熱門遊戲,並篡改破解副本。
都可能導致盜版副本或線上作弊等現象,造成重大收入損失
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.55
AWS CloudTrail
追溯使用者活動和
API使用方式
VPC Flow Logs
進出VPC中網路介面
的IP流量
CloudWatch Logs
使用日誌資料監控應用
程式,存儲和訪問日誌
檔
DNS Logs
使用VPC DNS解析程
式時,在VPC中記錄
DNS查詢
威脅檢測從日誌資料的收集開始
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.56
AWS CloudWatch
説明您隨時瞭解遊戲後端服務運行狀況,並對異常事件做出快速的回應
收集雲端資源(伺服器、網路、
存儲、資料庫等)的系統日誌、
性能指標和系統事件。
當問題發生時可進行告警,並
觸發預定義的操作。
監控您所使用的 AWS 服務資
源和應用。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.57
AWS CloudTrail
説明您記錄帳號內的所有操作行為,當發生問題時可快速追溯,定位問題
• 管控
• 合規
• 操作審計
• 風險審計
• 跨區域
• 記錄 API 訪問,可觸
發事件
• 日誌可歸檔,長期保
存
• 可直接在 Web 主控
台查詢最近的日誌
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.58 58
Amazon Macie
機器學習驅動的安全服務,用於發現,分類和保護敏感性資料
讓運維人員更加瞭解敏感資料的存放
位置和存取方式,包括消費者身份驗
證和存取模式。
資料自動分類 訪問行為分析
關鍵商務資訊,高價值的商業資訊的自
動分類, 如 PII 和個人資料,原始程式
碼, iOS 和 Android 應用程式簽名。
瞭解詳情,請訪問:HTTPs://aws.amazon.com/macie
使用機器學習理解使用者訪問資料
的行為,並使用使用者行為資料,
不斷的訓練並優化模型。
資訊安全自動化
Macie 通過了多項國際公認的標準認證,雲安全性的 ISO 27017 和針對雲隱私的 ISO 27018。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.59 59
Macie對資料進行自動分類
集成搜索與告警:
 查找敏感性資料記錄
 在原始程式碼中找到時通知
 在公開的的Amazon S3存儲桶找到時通知
鑒別和分類敏感性資料:
 個人識別資訊(PII)
 智慧財產權資訊
 關於AWS帳戶的敏感資訊
安全自動化:
 集成搜索 ->告警 ->自動化執行
 如果在原始程式碼找到AWS
Credential,自動禁用這個Key
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.60 60
Amazon GuardDuty
智慧化的威脅檢測和持續監控,以保護您的 AWS 帳戶和工作負載
• 針對雲設計的威脅檢測服務,可分析 VPC,DNS,CloudTrail 日誌
• 持續監控和保護 AWS 帳戶中運行的應用和服務,檢測異常與偏差行為
• 基於人工智慧/機器學習,檢測已知威脅以及未知威脅情報
瞭解詳情,請訪問:HTTPs://aws.amazon.com/guardduty
後門偵測
Backdoor
木馬偵測
Trojan
非法挖礦
Cryptocurrency
探測埠
Recon
非法侵入
Unauthorized
Access可疑行為,DNS 滲透 DGA 域請求 , 黑洞流量 與礦池非法連接 掃描非授權埠 , 匿名代理 異常 ISP 調用, SSH 暴力破解
 異常的API調用
 可能會導致帳戶洩密的潛在未經授權的部署
 潛在被入侵的實例或被攻擊者鎖定的實例
特殊檢測專案
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.61
AWS 管理主控台 API / JSON Format
快速查看威脅資訊
包括:
• 嚴重性
• 區域
• 數量/頻率
• 威脅類型
• 受影響資源
• 來源資訊
• 可通過CloudWatch
Events 查看
匯出資料用於自訂分析:
• 嵌入SIEM
• 更豐富資料
• 程式化回應
• 附加資訊
• ARN
• 時間跨度
• 資源資訊
Amazon GuardDuty説明運維人員發現威脅資訊
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.62 62
Amazon Inspector
自動評估應用程式的漏洞以及建議最佳實踐
瞭解詳情,請訪問:HTTPs://aws.amazon.com/inspector
自動評估常見漏洞與風險補正(CVE)
與Lamdba協作做自動修復
以預定義規則包(映射到常見安全最佳實踐和漏洞定義)
的形式提供給您。 內置規則的示例包括檢查從 Internet
對您的 EC2 實例進行的訪問、當前啟用的遠端根登錄,
或已安裝的易受攻擊的軟體版本。
產生按嚴重程度的安全檢驗報告
1
2
通過自動對應用程式進行安全評估並主動識別安全性漏
洞,説明您降低開發和部署過程中發生安全問題的風險。
這使您可以快速開發和反覆運算新應用程式,並評估其
對最佳實踐和政策的合規性。
3 Lambda並在觸發時處理自動評估的修復和重新運行
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.63
AWS Secrets Manager
高可用、金鑰託管服務
AWS Firewall Manager
跨帳戶和應用程式集中設定
和管理 AWS WAF 規則
AWS Certificate Manager
説明客戶在不需管理
私密金鑰情況下構建私人CA
AWS Config
AWS Config跨帳號和跨區域審計
Amazon Inspector
可以讓應用程式與最佳安全實踐
保持一致
Amazon Macie
可以説明使用者發現存儲在
Amazon S3 中的個人資料並對其
進行分類
AWS Identity and Access
Management (IAM)
讓組織能夠安全地管理對 AWS 服務和
資源的訪問
Amazon GuardDuty
具有智慧威脅檢測功能,可以持續監
控惡意行為或未授權行為
AWS 提供多樣安全服務, 保護資料安全
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.64
遊戲作弊的安全防禦
Game cheating security defense
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.65 65
遊戲開發者最常面對的就是、
作弊會導致遊戲不公平
游戏脚本外挂
遊戲通過腳本或外掛
更改遊戲數據與關卡
難度, 造成遊戲體驗與
公平性不佳。
在線訂單的付款欺詐
可能致使銀行拒絕或
退款, 造成遊戲運營
方的損失。
付款欺诈
身份的詐欺與偷竊, 可
能造成虛擬財產的損
失(如高價道具或卡
片的轉移)。
在线身份欺诈
檢測不良行為者使用
偷來的憑據登錄到合
法客戶的帳戶。
帐户接管
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.66
欺詐行為每年造成數十億美元的損失,機器學習已經被證明是有用的
使用AI人工智慧進行反欺詐行為檢測
常見的作法有:把關鍵戰鬥的運算元據保存下來,
存入到一個分析庫裡面,讓防作弊的機器用來分
析處理。
用機器學習做異常偵測, 必要時封禁掛機刷道具。
使用K-means與SageMaker聚類,以跟蹤和發
現遊戲中的交互異常。
遊戲也可以在伺服器端構建了對用戶端進行驗證
的服務,以便在提交資料之前識別出欺詐的行為
和模式。 >> 下載 PPT
檢測遊戲中的欺詐行為
每個遊戲都在伺服器端構建了對遊戲用戶
端進行驗證的服務,以便在提交資料之前
識別出欺詐的行為和模式,但是如果因此
帶來了延遲,將影響到玩家體驗。 在這個
主題分享中我們將學習如何通過機器學習
技術和 Amazon SageMaker 提高這一過
程的效率。
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.67 67
Amazon SageMaker
可以從創新想法到實際模型實現的最快速,最簡單的方法
構建 Build
收集與準備訓練數據
提供數據打標籤功能,並內
建常見問題的 Notebook.
選擇並優化您的機器學習算法
內置高性能的算法供選擇,
並提供模型及算法市場。
訓練 Train
配置並管理訓練環境
在最高性能的基礎架構上進
行“一鍵式”的模型訓練。
訓練並優化模型
一次訓練,各處運行。同時
提供模型優化的相關功能。
部署 Deploy
將模型部署到生產環境
“一鍵式”模型部署。
生產環境的管理與彈性伸縮
通過 Auto Scaling 完全託管,
成本節省可達 75%
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.68
Krafton是PUBG和TERA背後的韓國遊戲工作室,使用
AWS SageMaker進行AI反欺詐的異常行為檢測,在
SageMaker中應用自訂模型之後,確定了12種新的作
弊行為,這些行為以前沒有被發現(檢測到250例以前
未發現的濫用案例)
43.82%
26.49%
11.91%
9.09%
3.61%3.53%
0.68%0.38%0.38%0.08%0.04%
0.00%
5.00%
10.00%
15.00%
20.00%
25.00%
30.00%
35.00%
40.00%
45.00%
50.00%
Classificatio
n models
Self
similarity
method
NEW
type
abusers
Game
action
logs
KNOWN
type
abusers
Unsupervised
deep learning
models
採用非監督模型,尋找未知的作弊方式
HUE
YARN CLUSTER
Amazon RDS
SageMaker Training
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.70
Here to Help You Build

Mais conteúdo relacionado

Mais procurados

금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
Amazon Web Services Korea
 
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
AWS における Microservices Architecture と DevOps を推進する組織と人とツールAWS における Microservices Architecture と DevOps を推進する組織と人とツール
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
Amazon Web Services Japan
 

Mais procurados (20)

The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発The Twelve-Factor Appで考えるAWSのサービス開発
The Twelve-Factor Appで考えるAWSのサービス開発
 
20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes20211109 JAWS-UG SRE keynotes
20211109 JAWS-UG SRE keynotes
 
Amazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティスAmazon S3を中心とするデータ分析のベストプラクティス
Amazon S3を中心とするデータ分析のベストプラクティス
 
20190814 AWS Black Belt Online Seminar AWS Serverless Application Model
20190814 AWS Black Belt Online Seminar AWS Serverless Application Model  20190814 AWS Black Belt Online Seminar AWS Serverless Application Model
20190814 AWS Black Belt Online Seminar AWS Serverless Application Model
 
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
 
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
20190521 AWS Black Belt Online Seminar Amazon Simple Email Service (Amazon SES)
 
AWS Black Belt Techシリーズ Amazon CloudWatch & Auto Scaling
AWS Black Belt Techシリーズ  Amazon CloudWatch & Auto ScalingAWS Black Belt Techシリーズ  Amazon CloudWatch & Auto Scaling
AWS Black Belt Techシリーズ Amazon CloudWatch & Auto Scaling
 
AWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormationAWS Black Belt Online Seminar 2016 AWS CloudFormation
AWS Black Belt Online Seminar 2016 AWS CloudFormation
 
20191029 AWS Black Belt Online Seminar Elastic Load Balancing (ELB)
20191029 AWS Black Belt Online Seminar Elastic Load Balancing (ELB)20191029 AWS Black Belt Online Seminar Elastic Load Balancing (ELB)
20191029 AWS Black Belt Online Seminar Elastic Load Balancing (ELB)
 
20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions
 
AWS初心者向けWebinar AWS上でのDDoS対策
AWS初心者向けWebinar AWS上でのDDoS対策AWS初心者向けWebinar AWS上でのDDoS対策
AWS初心者向けWebinar AWS上でのDDoS対策
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
 
Black Belt Online Seminar Amazon CloudWatch
Black Belt Online Seminar Amazon CloudWatchBlack Belt Online Seminar Amazon CloudWatch
Black Belt Online Seminar Amazon CloudWatch
 
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
 
20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM 20190723 AWS Black Belt Online Seminar AWS CloudHSM
20190723 AWS Black Belt Online Seminar AWS CloudHSM
 
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020 AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
 
AWS Black Belt Techシリーズ Amazon SNS / Amazon SQS
AWS Black Belt Techシリーズ Amazon SNS / Amazon SQSAWS Black Belt Techシリーズ Amazon SNS / Amazon SQS
AWS Black Belt Techシリーズ Amazon SNS / Amazon SQS
 
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
 
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
금융권 최신 AWS 도입 사례 총정리 – 신한 제주 은행, KB손해보험 사례를 중심으로 - 지성국 사업 개발 담당 이사, AWS / 정을용...
 
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
AWS における Microservices Architecture と DevOps を推進する組織と人とツールAWS における Microservices Architecture と DevOps を推進する組織と人とツール
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
 

Semelhante a 雲端上的遊戲伺服器營運秘笈

20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
ssuser293781
 
IBM System X
IBM System XIBM System X
IBM System X
yangfan
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
Kay Yan
 
課程1 1:雲端運算初探
課程1 1:雲端運算初探課程1 1:雲端運算初探
課程1 1:雲端運算初探
vaemon
 
Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理
Amazon Web Services
 
Challenges and opportunities computing Kuo-Yi Chen
Challenges and opportunities computing   Kuo-Yi ChenChallenges and opportunities computing   Kuo-Yi Chen
Challenges and opportunities computing Kuo-Yi Chen
kuoyichen
 

Semelhante a 雲端上的遊戲伺服器營運秘笈 (20)

EC2 Spot in 104
EC2 Spot in 104EC2 Spot in 104
EC2 Spot in 104
 
Media State of the Union
Media State of the UnionMedia State of the Union
Media State of the Union
 
CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹CKmates - AWS 雲端運算 基礎服務介紹
CKmates - AWS 雲端運算 基礎服務介紹
 
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
20231027-轉型浪潮下 重新定義客戶體驗解決方案-CIO商業科技服務論壇.pptx
 
IBM System X
IBM System XIBM System X
IBM System X
 
云计算概念介绍2011 03
云计算概念介绍2011 03云计算概念介绍2011 03
云计算概念介绍2011 03
 
AWS Summit: Strikingly analytics
AWS Summit:  Strikingly analyticsAWS Summit:  Strikingly analytics
AWS Summit: Strikingly analytics
 
大规模数据处理
大规模数据处理大规模数据处理
大规模数据处理
 
使用Amazon Machine Learning 創建智能應用程式
使用Amazon Machine Learning 創建智能應用程式使用Amazon Machine Learning 創建智能應用程式
使用Amazon Machine Learning 創建智能應用程式
 
Aws reinvent 2015 - day 2
Aws reinvent 2015 - day 2Aws reinvent 2015 - day 2
Aws reinvent 2015 - day 2
 
課程1 1:雲端運算初探
課程1 1:雲端運算初探課程1 1:雲端運算初探
課程1 1:雲端運算初探
 
深入淺出 AWS 大數據工具
深入淺出 AWS 大數據工具深入淺出 AWS 大數據工具
深入淺出 AWS 大數據工具
 
Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理Track 2 Session 2_ 電商平台的資安維運與成本管理
Track 2 Session 2_ 電商平台的資安維運與成本管理
 
Cnut 容器大会 京东
Cnut 容器大会 京东Cnut 容器大会 京东
Cnut 容器大会 京东
 
Challenges and opportunities computing Kuo-Yi Chen
Challenges and opportunities computing   Kuo-Yi ChenChallenges and opportunities computing   Kuo-Yi Chen
Challenges and opportunities computing Kuo-Yi Chen
 
Huawei cloud computing
Huawei cloud computingHuawei cloud computing
Huawei cloud computing
 
Big Data World Forum
Big Data World ForumBig Data World Forum
Big Data World Forum
 
中國阿里雲與Azure比較
中國阿里雲與Azure比較中國阿里雲與Azure比較
中國阿里雲與Azure比較
 
美团技术沙龙04 美团下一代分布式存储系统
美团技术沙龙04   美团下一代分布式存储系统美团技术沙龙04   美团下一代分布式存储系统
美团技术沙龙04 美团下一代分布式存储系统
 
破雲而出 — 重新發現您的雲端策略
破雲而出 — 重新發現您的雲端策略破雲而出 — 重新發現您的雲端策略
破雲而出 — 重新發現您的雲端策略
 

Mais de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

雲端上的遊戲伺服器營運秘笈

  • 1. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.1 雲上的遊戲伺服器 Operation for your Game Servers 營運秘笈 Elina Lin| BDM | 2020/4/23
  • 2. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.2 AWS 如何計費? 按實際使用量付費 按實際使用量付費的模式讓您可以輕鬆適 應不斷變化的業務需求,無需投入過多預 算,同時還可提高您對變化的響應能力。 採用按實際使用量付費的模式,您可以根 據實際需求而非預測來調整業務,從而降 低容量過度預配置或不足的風險 通過預留容量節約成本 對於有些服務,如 Amazon EC2 和 Amazon RDS,您可以購買預留容量。 與使用等量按需容量相比,使用預留實例 可節省高達 75% 的費用。購買預留實例 時,預付金額越高,享受的折扣就越大。 使用越多,付費越少 對於 AWS,您可以享受基於使用量的折 扣,且使用量越大,節省的資金越多。對 於 S3 之類的服務而言,分級定價意味著 使用量越大,為每 GB 支付的費用就越少。 AWS 還為您提供了各種服務採購選項, 以幫助滿足您的業務需求。
  • 3. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.3 AWS 省錢秘笈 第一式 :量體裁衣 Right-Sizing your Game Servers
  • 4. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.4 AWS 提供最具廣度和深度的伺服器類型選擇 全方位滿足您對遊戲服性價比的追求 分類 能力 選項 275種實例類型 超過
  • 5. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.5 案例:網易《荒野行動》在海外部署遇到的性能挑戰 《荒野行動》海外版一周年數據: 全球營收 4.5 億+ 美元 全球註冊用戶 2.5 億+ 全球下載量 5800 萬+ 2018年初 Intel Spectre & Meltdown 漏洞爆發,AWS 跟進修復 修復漏洞後 c3/c4/m3/m4 等系列性能損失,最高降低 50%(網路密集型業務) 荒野行動日服春節人數創新高,但遭遇 CPU 網卡軟中斷性能瓶頸
  • 6. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.6 荒野行動每日服務 增加機器數量 Irq affinity 提升 50% 開啟 RPS/RFS 提升 40% 仍無法滿足不斷新高的需求
  • 7. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.7 將伺服器取代為使用 Nitro System 的 C5 系列,徹底解決問題! C4 系列 C5 系列 將原來使用的 C4 列號取代為 C5 系列, 取代比例 2 : 1 成本節省 42%
  • 8. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.8 網路加速 (混合架構) 新加坡區域 美東區域 東京區域 Chat Payment Log DB Game s proxy1 proxy2 game1 game2 game3 manager... ... ... ... ... ... 東南亞玩家 東亞玩家 歐美玩家 除了遊戲伺服器, 用於處理網路請求為主的伺服器,還有進一步提升性價比的空間
  • 9. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.9 AWS Graviton2 Processor 全球首款在公有雲上可用的 Arm 處理 器 基於 64-bit Arm Neoverse 核心,AWS 設計的晶片,7 nm 製程 最高可達 16 vCPUs,10 Gbps 增強網路, 3.5 Gbps EBS 頻寬 基於 64-bit Arm Neoverse 核心,AWS 設 計的晶片,16 nm 製程 最高可達 64 vCPUs,25 Gbps 增強網 路,18 Gbps EBS 頻寬 與上一代相比,7 倍的性能,4 倍的核心 數,5 倍的記憶體速度 Graviton 處理器 (A1 列) Graviton2 處理器 (M6g, R6g, C6g 系欄位) 基於 AWS Graviton2 處理器的全新一代 Arm 架構實體,相比目前的 x86 架構實體,性價比提升 40% !
  • 10. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.10 • 網路效能:A1 ≈ C5 > C4 • 成本:A1 < C5 < C4 • 比 C5 節省 40% 成本 • 比 C4 節省 49% 成本 網路效能對比測試:A1 非常適合於網路密集型工作負載 Instance Type CPU &Memory NIC Queue Cost ($ per hour) a1.large 2core 4GB 1 0.051 c4.large 2core 3.75GB 2 0.10 c5.large 2core 4GB 2 0.085 a1.xlarge 4core 8GB 1 0.102 c4.xlarge 4core 7.5GB 2 0.199 c5.xlarge 4core 8GB 4 0.17 0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 100 200 300 400 500 600 Network Bandwidth (internal, Gbps) a1.large c4.large c5.large a1.xlarge c4.xlarge c5.xlarge PPS (K per second) a1.large c4.large c5.large a1.xlarge c4.xlarge c5.xlarge
  • 11. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.11 AWS 省錢秘笈 第二式 :活用彈性 Make good use of Elasticity
  • 12. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.12 傳統方式:預置的遊戲伺服器 執行的伺服器數量 實際需要的伺服器數量 (線上人數變化導致) 容量 存在較多空閒的 資源,浪費成本 資源不滿足實際需要 用戶體驗到遊戲卡頓、延遲 用戶流失,遊戲收入下降 遊戲伺服器的彈性伸縮程度,極大地影響著使用者的遊戲 體驗以及成本的節約程度 彈性伸縮的遊戲伺服器架構 需求
  • 13. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.13 Amazon GameLift  玩家符合引擎:讓您便捷地自定義玩家匹配邏輯,在網 路延遲和競爭性之間做出最佳平衡。 Amazon GameLift  工作階段自動分配:自動在全球各個 AWS 區域中選取 離玩家最近的地方放置遊戲會話,極大降低網路延遲。  自動彈性伸縮:自動對遊戲服集群進列容量的延伸 與收縮,確保您只對實際需要使用的資源付費。  輕鬆實現全球同服:通過 API 輕鬆接入,免除自行構 建全球同服游戲後端服務的繁重工作。 © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.13 遊戲客戶端 遊戲客戶端 遊戲客戶端 遊戲客戶端 後端接入 服務 玩家資料 (例如:等級、隊伍) 玩家資料 網路延遲 對話分配 隊列 遊戲伺服器 群集(東京) 遊戲伺服器 群集(新加坡) 遊戲伺服器 群集(美東)
  • 14. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.14 Amazon GameLift 的 彈性伸縮機制 • 為您的遊戲伺服器自動維持一個指定水平 的會話可用性; • 跟蹤資源充足度,自動增減伺服器; • 可根據您遊戲的需要,配置自動彈性伸縮規 則; • 彈性伸調整規則可根據以下指標進行設定:  玩家平均等待時間  玩家工作階段數量  遊戲工作階段數量  可用的實體數量
  • 15. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.15 Amazon GameLift – 遊戲工作階段狀態追蹤 即時追蹤遊戲伺服器集群中的遊戲工作階段狀態 向下要檢視玩家工作階段時狀態
  • 16. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.16 2.5 億+ 1000 萬+ 全球 註冊玩家 同時 在線人數 Epic Games 基於 AWS 全球基礎 設施,為玩家提供優質的遊戲體驗 Epic Games 使用了 AWS 一系列的服務來滿 足遊戲運行的需要,資源彈性支援從高峰期 10 倍於一般時段的負載量,到全網 2 億玩家共同參 與的大型活動。 - Chris Dyl, Director of Platform at Epic Games
  • 17. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.17 AWS 省錢秘笈 第三式 :預留容量 Reserve Capacity to get Discount
  • 18. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.18 Amazon EC2 的購買選項 競價實體(Spot) 搶到就賺,用完就撤 變廢為寶, 要的就是便宜 預留實體 長期持有,批發路線 物美價廉,小康之家 依需實體 即買即用,零售路線 價格最貴,有錢任性
  • 19. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.19 混合使用不同類型的實體到最佳成本優化效果! 適合用競價實體(Spot)的場景: • 微服務架構(遊戲平臺/中心伺服器) • 大數據處理和分析(數據伺服器) • 低至 1 折 適合使用按需實例的場景: • 有狀態的遊戲,無法預測使用時間(如:活動 突增,公休日突增,測試中......) • 標準定價,按使用時長計費 適合使用預留實例的場景: • 穩定性要求高,且已知需要長期使用的伺服器, 如:資料庫伺服器,傳統平臺/中心伺服器等 • 低至 4 折
  • 20. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.20 我不確定不同區域的伺服器數量會如何變化, 也不保證伺服器配置不會變化, 那就沒法通過預留實例來省錢了嗎?
  • 21. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.21 新增定價模式: Savings Plans 新靈活定價模型,可協助您節省多達 72% 的 EC2 和 Fargate 用量花費。 客戶只需承諾在 1 年或 3 年內固定的服務用量(例如每小時 10 美元),即可獲得該用量對應的折扣。 而該折扣 可自動應用於全球所有區域和所有的實例類型。 每種計算類型都有一個 "On-Demand" 價 格和 "Savings Plans" 價格。 如果客戶承 諾每小時支付 10 美元的計算使用費,那麼他 們將最高有 10 美元的用量適用 "Savings Plans" 折扣價格。 超出承諾範圍的任何用 量將按常規 "On-Demand" 收費。 它是如何工作的?這是什麼?
  • 22. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.22 Singapore Oregon Ireland c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge Saving Plans 舉例 原來:全部 On Demand 計費,$60K/month ...... ...... ...... 10K/month 40K/month 10K/month
  • 23. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.23 Singapore Oregon Ireland c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge 買了一個 $30K/month 的 Savings Plan – 自動應用折扣最優的實體 ...... ...... ...... 10K/month 40K/month 10K/month Savings Plans 30K/month 7 折 6.8 折 7.2 折 7.1 折 7.3 折 7.5 折 6.9 折 6.6 折 7.1 折 7.1 折 7.2 折 7.3 折 7.1 折 7 折 7.8 折 7.5 折 7.7 折 7.6 折 白色部分為原折扣較低的實體,未被Saving Plans匹配到的狀況下 以原本On-demand的費用計費
  • 24. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.24 Singapore Oregon Ireland c4.xlarge c5.2xlarge m5.4xlarge c4.xlarge t2.medium r5.8xlarge c3.2xlarge c5.2xlarge t2.medium r5.8xlarge c3.2xlarge 若實際使用的實體數量變化、調整型號或者進行區域性增減調整 Savings Plan 自動重新符合,確保最大程度覆蓋和利用 ...... ...... Savings Plans 30K/month On Demand 6.9 折, 5K 6.6 折, 5K 6.9 折, 5K 6.9 折, 5K 6.9 折, 5K On Demand 7 折, 5K On Demand On Demand On Demand 平均 7 折,復原後可覆蓋 $43K On Demand 費用 調整後,假設若全部 On Demand,總消費為 $50K/month Savings Plan 自動覆蓋後,月消費為 $37K
  • 25. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.25 AWS 省錢秘笈 第四式 :Spot 實體 Use Spot Instance Whenever you Can
  • 26. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.26 Spot 範例的簡單規則
  • 27. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.27 價格變化基於各資源池對於短期容量的長期的供需關係—沒 有你想像的那麼交替 只需要為申請的資源按市場價定價,市場價不高於你的定價。 無需競價 只有滿足按需請求時,才會被中斷。 不會因有人出價更高而 回收實體資源 Spot 實體中的重要概念(續)
  • 28. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.28 擔心 Spot 實例隨時被中斷? 在過去的3月中, 95% 的實體中斷來自客戶手動 停止實體, 因為應用程式已完成其工作
  • 29. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.29 好像很複雜的樣子…… 如何將 Spot 用於遊戲伺服器?
  • 30. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.30 GameLift FleetIQ US-WEST-2 Region Placement Queue US-EAST-1 Region AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift  持續跟踪 Spot 實體中斷率,據此自動將游 戲會話放置到具有最低中斷率的 Spot 實體  中斷率進一步降低(低於 1%)  通過 Spot 實體進一步節省遊戲伺服器成本
  • 31. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.31 GameLift FleetIQ:遊戲會話放置實例選擇流程 US-WEST-2 Region Placement Queue US-EAST-1 Region Step 1:選擇玩家網絡延遲最低 的區域 Latency = 20ms Latency = 60ms AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift
  • 32. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.32 GameLift FleetIQ:遊戲會話放置實例選擇流程 US-WEST-2 Region Placement Queue US-EAST-1 Region Step 2:計算實體的風險係數, 排除風險係數較高的實體 Latency = 20ms Latency = 60ms AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift
  • 33. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.33 GameLift FleetIQ:遊戲會話放置實例選擇流程 US-WEST-2 Region Placement Queue US-EAST-1 Region Step 3:選擇成本最低的實體 Latency = 20ms Latency = 60ms AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift
  • 34. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.34 GameLift FleetIQ:遊戲會話放置實例選擇流程 US-WEST-2 Region Placement Queue US-EAST-1 Region 首選的區域沒有空閒資源了? Latency = 20ms Latency = 60ms AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift
  • 35. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.35 GameLift FleetIQ:遊戲會話放置實例選擇流程 US-WEST-2 Region Placement Queue US-EAST-1 Region 切換到最近的另一個區域,實體 選擇邏輯同上 Latency = 20ms Latency = 60ms AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift
  • 36. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.36 US-WEST-2 Region Placement Queue US-EAST-1 Region AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift 如果所有區域都沒有空閒資源了 怎麼辦? GameLift FleetIQ:遊戲會話放置實例選擇流程
  • 37. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.37 US-WEST-2 Region Placement Queue US-EAST-1 Region AWS CloudAWS Cloud Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large Spot C5.large Spot C5.xlarge Spot C5.2xlarge On-demand C5.large AWS Cloud Game services Game clients FlexMatch Amazon GameLift 放置到最優區域,最優成本,正在 運行但是有中斷風險的實例上 GameLift FleetIQ:遊戲會話放置實例選擇流程
  • 38. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.38 “Ubisoft 致力於通過難忘的原創遊戲體驗豐富玩家的 生活。在For Honor 上,使用Amazon GameLift 雲遊 戲服務器可使我們遵守這一承諾。使用FleetIQ Spot 實例,我們可以提供無縫、可擴展的玩家體驗,在每 一百萬次遊戲會話中,受到中斷影響的遊戲會話不到 一次。” Laurent Chouinard, Online Programming Lead, Ubisoft
  • 39. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.39 “在Behaviour Interactive 公司,玩家體驗是第一位 的。這也是我們將Dead by Daylight 的專用服務器 委託給Amazon GameLift 的原因。使用FleetIQ Spot 實例,在2500萬次遊戲會話中,我們的中斷率 僅為0.00033%,這有助於我們集中精力為玩家帶來 令人興奮的全新功能,而只需對基礎設施進行很少 的維護。”” Fadi Beyrouti, Head of Technology, Behaviour Interactive
  • 40. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.40 關心完成本 那麼來談談安全
  • 41. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.41 遊戲後端安全面臨重重挑戰 如 果 你 是 一 個 遊 戲 開 發 者 或 運 維 人 員 , 那 麼 你 需 要 考 慮 後 端 安 全 性 。 癱 瘓 遊 戲 服 務 資 源 、 識 別 玩 家 個 人 資 訊 和 帳 戶 憑 據 、 以 及 對 遊 戲 玩 法 進 行 作 弊 對 於 做 惡 的 人 來 說 是 有 價 值 的 。 為 了 不 使 環 境 暴 露 于 惡 意 軟 體 或 駭 客 的 攻 擊 之 下 , 需 要 多 層 次 採 用 安 全 管 理 、 分 析 異 常 狀 況 、 進 而 使 遊 戲 處 於 健 康 的 狀 態 。 運維人員須耗費大量精力在海量的玩家日誌中分 辨不合法行為並對敏感性資料進行保護 遊戲伺服器數量龐大,易有未打補丁的系統漏洞 被惡意入侵時對遊戲服造成性能低落
  • 42. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.42 遊戲常見的安全問題,DDoS攻擊,威脅檢測,資料隱私,作弊監測 都可以透過AWS服務獲得解決方案 雲原生的遊戲安全防禦 42 資料隱私 通過惡意軟體竊取帳戶 資訊,然後通過更改密 碼將玩家的頂級裝備被 出售或轉移到駭客擁有 的另一個帳戶以便稍後 出售。 遊戲作弊威脅檢測 駭客通過未打補丁的系統 漏洞或非法侵入,入侵到 內部網絡,並逐漸接近重 要伺服器,遊戲重要資料 流程失 。 DDOS攻擊 (分散式拒絕服務) 攻擊者通常將會發送看似 有效但並非由實際玩家生 成的流量。 可能會損壞 玩家的體驗。 抵禦這些 攻擊對於保護玩家體驗和 信任您的品牌非常重要。 駭客通過社交工程/木馬 程式,對正常使用的內部 主機種下後門,造成遊戲 原始程式碼或使用者個人 資料洩露。
  • 43. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.43 43 DDos攻擊的安全防禦 DDos Attack Security Defense
  • 44. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.44 44 普通玩家 遊戲用戶端 玩家資料訪問 配對和會話發現 連接到遊戲伺服器 會話請求 請求操作 - 登錄, 遊戲會話,配對等 遊戲會話結果和玩家技能更新 玩家資料庫後臺服務 伺服器 資料中心 會話存儲會話發現/ 管理伺服器 遊戲伺服器 攻擊者 被控制的 設備 攻擊者 被控制的設備 會話資料 訪問 DDoS典型的攻擊遊戲伺服器方式 會以無法有效處理的流量作為目標,從而影響遊戲的可用或性能
  • 45. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.45 45 容易受到 DDoS 攻擊影響的遊戲服務 後臺服務 Backend Service 遊戲服務 Game Service  使用者認證  會話發現  排行榜  匹配系統  遊戲伺服器  即時遊戲會話  遊戲代理伺服器  隊伍  文字 & 語音聊天  內容分發 特別是功能服務層的聊天,商城, NPC ,錢 包,道具,排行榜,使用者資料等全域服務 受到影響時使使用者體驗不佳
  • 46. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.46 46 資料 Data 7 應用層 資料傳輸協議 資料 Data 6 展示層 資料格式與加密 資料 Data 5 工作階段層 開始、控制和結束會話 段 Segments 4 傳輸層 端到端的網路資料流程 資料單位 層 包 Packets 3 網路層 源和終點之間建立連接 幀 Frames 2 資料連結層 單個鏈路上如何傳輸資料 比特 Bits 1 實體層 將資訊編碼成電或者光 反射型 UDP 攻擊占了遊戲類型 DDoS 攻擊的 55% 針對遊戲服的DDos攻擊常見落在網路層,難發起應用層攻擊
  • 47. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.47 47 使攻擊面最小化 ELB 創建 DMZ 區,將攻擊阻擋在外層 並通過 Security Group 限定進入流量 SSH Bastion NAT Gateway 自動擴展應對攻擊 保護暴露的資源 Web Application Firewall 檢測並過 濾應用層流量 HTTP & HTTPS Edge location Route 53 對攻擊制訂對應策略 AWS Shield WAF ELB CloudWatch 定制 AWS WAF 規則 , SQLi, XSS, 限速機制 , 黑名 單 通過自動擴展與快速分佈的資源,將 攻擊威力分散與減弱 對服務正常的行為模式瞭若指掌 , 對 於異常狀況就能快速反應 針對 HTTP Flood, AWS 提供的 DDoS 防禦戰略
  • 48. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.48 4848 遊戲玩家 Amazon CloudFront Amazon Route53 Elastic Load Balancing DDoS 攻擊  DDoS 防禦能力已內置集成到 AWS 的網路服務 (CloudFront, Route53, ELB)無需額外費用。  DDoS 防禦一直開啟,快速抵禦,無需人工干預或進行外 部路由;  充分利用 AWS 資料中心的冗余互聯網連接和超高頻寬;  自動抵禦最常見的攻擊,如:SYN/ACK 泛洪、UDP 泛洪、 反射攻擊等;在每個進入點提供高容量緩解。  與傳統的方法相比,AWS Shield 可以提供延遲優勢。 為 了為您的遊戲應用程式提供最佳覆蓋範圍。 AWS 全球基礎架構 已內置 DDoS 防禦能力(AWS Shield) AWS Shield
  • 49. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.49 4949  攻擊通知:通過 Amazon CloudWatch 即時監控與通知 攻擊,針對攻擊取證和資料包捕獲。  自動保護:防止最常見的 SYN / ACK泛洪,UDP泛洪, 反射攻擊等 L3/4 和L7 DDoS 保護。  DRT 團隊:全天候 DDoS 回應小組 DDoS Response Team (DRT),定制化的緩解策略來説明保護遊戲應用 程式的可用性。 許多遊戲應用程式需要用戶端軟體來生成 具有可預測模式的流量。 DRT可以構建根據您的遊戲邏輯 量身定制的緩解措施,並保護最有可能來自實際玩家的流 量。  帳單保護:AWS 承擔因為 DDoS攻 擊產生的相關資源成 本 如果希望更加全面的緩解DDoS 攻擊, 可以訂閱AWS Shield Advanced
  • 50. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.50 50  AWS WAF 是一個託管的第七層網路攻擊檢測和抵禦服務, 它監控所有的 HTTP/S 請求,保護 Web 應用,設定注入攻 擊規矩(協力廠商規矩或白名單),抵禦惡意攻擊;  藉由AWS WAF,您可以保護遊戲的Web應用程式元件(如 登錄頁面,應用內購買或API)應用程式層威脅或Web請求 氾濫  AWS WAF允許定自義匹配條件,並將這些條件組合到一個 , 也可以使用基於速率的規則來臨時阻止符合指定條件的IP位 址,並以過高的速率訪問應用程式。  使用AWS Firewall Manager來管理AWS WAF規則和AWS Shield Advanced受保護的資源。 這樣,即使添加了新資源, 也可以確保整個應用程式都由一組標準策略覆蓋 。 AWS WAF Web應用程式防火牆 White List Black List SQL Injection XSS HTTP Flood Scanner & Probes IP Reputation Lists Bad Bot
  • 51. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.51 5151  遊戲伺服器在多個地區運行,對於來自世界各地的玩家,通常都要求一致的表現  Global Accelerator是在遊戲伺服器前部署的網路層服務,以加快遊戲玩家訪問遊戲服的速度,並提升可 用性和性能  Global Accelerator使用AWS全球網路,功能包括靜態任播IP位址、 智慧流量分配、 增強的容錯能力、 TCP和UDP協定支援、 即時區域容錯移轉,並自動集成于AWS Shield ,可在攻擊到達遊戲服前過濾 AWS Global Accelerator + AWS Shield ,將DDoS攻擊防禦在邊 緣端
  • 52. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.52 52 遊戲用戶端 獨立的遊 戲伺服器 (5.6.7.8) AWS Cloud Region A 獨立的游 戲伺服器 (9.10.11.12) 遊戲用戶端 攻擊者 獨立的遊 戲伺服器 (1.2.3.4) Amazon GameLif t Fleet Amazon GameLift 將嘗 試放置會話,直到伺服 器已滿或無回應 一旦 Amazon GameLift 檢 測到 Fleet 中的會話數量較 少,它將添加另一個實例。 Game Lift 的解決方案
  • 53. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.53 遊戲如何做威脅檢測 How games do threat detection
  • 54. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.54 灰 色 軟 體 是 一 種 執 行 意 外 操 作 或 未 授 權 操 作 的 程 式 、 用 於 指 代 間 諜 軟 體 、 廣 告 軟 體 、 撥 號 程 式 、 惡 作 劇 程 式 、 遠 端 存 取 工 具 和 任 何 其 他 不 受 歡 迎 的 檔 和 程 式 具 有 一 定 程 度 風 險 性 的 灰 色 軟 體 無 法 簡 單 的 用 黑 與 白 名 單 來 區 分 這 就 是 威 脅 檢 測 。 駭客通過灰色軟體滲透攻擊安全性漏洞,竊取使用者私隱資 訊如信用卡等,國際許多知名遊戲帳號系統都曾遭受大規模 攻擊 駭客對遊戲進行逆向工程破解,複製熱門遊戲,並篡改破解副本。 都可能導致盜版副本或線上作弊等現象,造成重大收入損失
  • 55. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.55 AWS CloudTrail 追溯使用者活動和 API使用方式 VPC Flow Logs 進出VPC中網路介面 的IP流量 CloudWatch Logs 使用日誌資料監控應用 程式,存儲和訪問日誌 檔 DNS Logs 使用VPC DNS解析程 式時,在VPC中記錄 DNS查詢 威脅檢測從日誌資料的收集開始
  • 56. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.56 AWS CloudWatch 説明您隨時瞭解遊戲後端服務運行狀況,並對異常事件做出快速的回應 收集雲端資源(伺服器、網路、 存儲、資料庫等)的系統日誌、 性能指標和系統事件。 當問題發生時可進行告警,並 觸發預定義的操作。 監控您所使用的 AWS 服務資 源和應用。
  • 57. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.57 AWS CloudTrail 説明您記錄帳號內的所有操作行為,當發生問題時可快速追溯,定位問題 • 管控 • 合規 • 操作審計 • 風險審計 • 跨區域 • 記錄 API 訪問,可觸 發事件 • 日誌可歸檔,長期保 存 • 可直接在 Web 主控 台查詢最近的日誌
  • 58. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.58 58 Amazon Macie 機器學習驅動的安全服務,用於發現,分類和保護敏感性資料 讓運維人員更加瞭解敏感資料的存放 位置和存取方式,包括消費者身份驗 證和存取模式。 資料自動分類 訪問行為分析 關鍵商務資訊,高價值的商業資訊的自 動分類, 如 PII 和個人資料,原始程式 碼, iOS 和 Android 應用程式簽名。 瞭解詳情,請訪問:HTTPs://aws.amazon.com/macie 使用機器學習理解使用者訪問資料 的行為,並使用使用者行為資料, 不斷的訓練並優化模型。 資訊安全自動化 Macie 通過了多項國際公認的標準認證,雲安全性的 ISO 27017 和針對雲隱私的 ISO 27018。
  • 59. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.59 59 Macie對資料進行自動分類 集成搜索與告警:  查找敏感性資料記錄  在原始程式碼中找到時通知  在公開的的Amazon S3存儲桶找到時通知 鑒別和分類敏感性資料:  個人識別資訊(PII)  智慧財產權資訊  關於AWS帳戶的敏感資訊 安全自動化:  集成搜索 ->告警 ->自動化執行  如果在原始程式碼找到AWS Credential,自動禁用這個Key
  • 60. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.60 60 Amazon GuardDuty 智慧化的威脅檢測和持續監控,以保護您的 AWS 帳戶和工作負載 • 針對雲設計的威脅檢測服務,可分析 VPC,DNS,CloudTrail 日誌 • 持續監控和保護 AWS 帳戶中運行的應用和服務,檢測異常與偏差行為 • 基於人工智慧/機器學習,檢測已知威脅以及未知威脅情報 瞭解詳情,請訪問:HTTPs://aws.amazon.com/guardduty 後門偵測 Backdoor 木馬偵測 Trojan 非法挖礦 Cryptocurrency 探測埠 Recon 非法侵入 Unauthorized Access可疑行為,DNS 滲透 DGA 域請求 , 黑洞流量 與礦池非法連接 掃描非授權埠 , 匿名代理 異常 ISP 調用, SSH 暴力破解  異常的API調用  可能會導致帳戶洩密的潛在未經授權的部署  潛在被入侵的實例或被攻擊者鎖定的實例 特殊檢測專案
  • 61. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.61 AWS 管理主控台 API / JSON Format 快速查看威脅資訊 包括: • 嚴重性 • 區域 • 數量/頻率 • 威脅類型 • 受影響資源 • 來源資訊 • 可通過CloudWatch Events 查看 匯出資料用於自訂分析: • 嵌入SIEM • 更豐富資料 • 程式化回應 • 附加資訊 • ARN • 時間跨度 • 資源資訊 Amazon GuardDuty説明運維人員發現威脅資訊
  • 62. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.62 62 Amazon Inspector 自動評估應用程式的漏洞以及建議最佳實踐 瞭解詳情,請訪問:HTTPs://aws.amazon.com/inspector 自動評估常見漏洞與風險補正(CVE) 與Lamdba協作做自動修復 以預定義規則包(映射到常見安全最佳實踐和漏洞定義) 的形式提供給您。 內置規則的示例包括檢查從 Internet 對您的 EC2 實例進行的訪問、當前啟用的遠端根登錄, 或已安裝的易受攻擊的軟體版本。 產生按嚴重程度的安全檢驗報告 1 2 通過自動對應用程式進行安全評估並主動識別安全性漏 洞,説明您降低開發和部署過程中發生安全問題的風險。 這使您可以快速開發和反覆運算新應用程式,並評估其 對最佳實踐和政策的合規性。 3 Lambda並在觸發時處理自動評估的修復和重新運行
  • 63. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.63 AWS Secrets Manager 高可用、金鑰託管服務 AWS Firewall Manager 跨帳戶和應用程式集中設定 和管理 AWS WAF 規則 AWS Certificate Manager 説明客戶在不需管理 私密金鑰情況下構建私人CA AWS Config AWS Config跨帳號和跨區域審計 Amazon Inspector 可以讓應用程式與最佳安全實踐 保持一致 Amazon Macie 可以説明使用者發現存儲在 Amazon S3 中的個人資料並對其 進行分類 AWS Identity and Access Management (IAM) 讓組織能夠安全地管理對 AWS 服務和 資源的訪問 Amazon GuardDuty 具有智慧威脅檢測功能,可以持續監 控惡意行為或未授權行為 AWS 提供多樣安全服務, 保護資料安全
  • 64. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.64 遊戲作弊的安全防禦 Game cheating security defense
  • 65. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.65 65 遊戲開發者最常面對的就是、 作弊會導致遊戲不公平 游戏脚本外挂 遊戲通過腳本或外掛 更改遊戲數據與關卡 難度, 造成遊戲體驗與 公平性不佳。 在線訂單的付款欺詐 可能致使銀行拒絕或 退款, 造成遊戲運營 方的損失。 付款欺诈 身份的詐欺與偷竊, 可 能造成虛擬財產的損 失(如高價道具或卡 片的轉移)。 在线身份欺诈 檢測不良行為者使用 偷來的憑據登錄到合 法客戶的帳戶。 帐户接管
  • 66. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.66 欺詐行為每年造成數十億美元的損失,機器學習已經被證明是有用的 使用AI人工智慧進行反欺詐行為檢測 常見的作法有:把關鍵戰鬥的運算元據保存下來, 存入到一個分析庫裡面,讓防作弊的機器用來分 析處理。 用機器學習做異常偵測, 必要時封禁掛機刷道具。 使用K-means與SageMaker聚類,以跟蹤和發 現遊戲中的交互異常。 遊戲也可以在伺服器端構建了對用戶端進行驗證 的服務,以便在提交資料之前識別出欺詐的行為 和模式。 >> 下載 PPT 檢測遊戲中的欺詐行為 每個遊戲都在伺服器端構建了對遊戲用戶 端進行驗證的服務,以便在提交資料之前 識別出欺詐的行為和模式,但是如果因此 帶來了延遲,將影響到玩家體驗。 在這個 主題分享中我們將學習如何通過機器學習 技術和 Amazon SageMaker 提高這一過 程的效率。
  • 67. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.67 67 Amazon SageMaker 可以從創新想法到實際模型實現的最快速,最簡單的方法 構建 Build 收集與準備訓練數據 提供數據打標籤功能,並內 建常見問題的 Notebook. 選擇並優化您的機器學習算法 內置高性能的算法供選擇, 並提供模型及算法市場。 訓練 Train 配置並管理訓練環境 在最高性能的基礎架構上進 行“一鍵式”的模型訓練。 訓練並優化模型 一次訓練,各處運行。同時 提供模型優化的相關功能。 部署 Deploy 將模型部署到生產環境 “一鍵式”模型部署。 生產環境的管理與彈性伸縮 通過 Auto Scaling 完全託管, 成本節省可達 75%
  • 68. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.68 Krafton是PUBG和TERA背後的韓國遊戲工作室,使用 AWS SageMaker進行AI反欺詐的異常行為檢測,在 SageMaker中應用自訂模型之後,確定了12種新的作 弊行為,這些行為以前沒有被發現(檢測到250例以前 未發現的濫用案例) 43.82% 26.49% 11.91% 9.09% 3.61%3.53% 0.68%0.38%0.38%0.08%0.04% 0.00% 5.00% 10.00% 15.00% 20.00% 25.00% 30.00% 35.00% 40.00% 45.00% 50.00%
  • 70. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.70 Here to Help You Build