SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Zhao Fei Solution Architect
2018-3-8
Chinese gaming customer cases sharing
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
Architect 架构之道
Database 数据之道
Operation 运维之道
Security 安全之道
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Architect
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Oasis Games: A Global Player
Over 45games in different genres
More than 40countries
In 16languages
Mobile / Browser / Steam / PS4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Legacy Oasis Payment Platform
Panel Pay Pages
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Phase 1: Infrastructure replacement
 Computing
 Storage
 Network
S3
Region
Availability
Zone A
Tools
1. ApacheBench (http://httpd.apache.org/docs/2.2/en/programs/ab.html): simple HTTP web
server load test tool
2. Siege (https://www.joedog.org/siege-home/) : HTTP load test and benchmark tool
3. JMeter (http://jmeter.apache.org/) : very famous load test tool based on JAVA, originated
from 1998
4. The Grinder (http://grinder.sourceforge.net/): agent based load test framework, Java.
5. Gatling (http://gatling.io/) : Scala load test framework based on Akka and Netty
6. Tsung (http://tsung.erlang-projects.org/) : Erlang load test tool, support HTTP, websocket,
databse, MQTT, TCP
7. Bees (https://github.com/newsapps/beeswithmachineguns) : AWS oriented opensource
load test tool
8. Vegeta (https://github.com/tsenart/vegeta) : Go based opensource HTTP load test tool
9. RedLine13 (https://www.redline13.com/) : AWS Advanced Tehchnology Partner
10.Loader.io (https://loader.io/): load test service base on Cloud server.
11.Goad (https://goad.io/) : load test using AWS Lambda, based on Go. The result are
delivered to AWS SQS.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Phase 2: External services
CloudFront acceleration
S3
Route53 Geo IP
CloudFront
CDN
ELB
S3
EC2EC2EC2
Region
Availability
Zone A
Availability
Zone B
TIPS
• One regions server is available
depends on game types
• Use CF for HTTP(s)
• Use Proxy Server for TCP
• Design your game service allowing
min latency ex) buffering, async
simple AI
• Check all latency in every region.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Good architect, but..
Availability Zone
Amazon
Route 53
User
Amazon S3
Amazon
Cloudfront
Availability Zone
Elastic Load
Balancing
RDS DB Instance
Read Replica
App
Instance
App
Instance
App
Instance
RDS DB Instance
Read Replica
App
Instance
App
Instance
App
Instance
RDS DB Instance
Standby (Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
0
20
40
60
80
100
120
2013 2014 2015 Jul, 2016
Total Orders (million)
1st Challenge :Growth & Slow
0
2
4
6
8
10
12
14
16
2013 2014 2015 Jul, 2016
Anaylze Query Cost (s)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
2nd Challenge: Distributed data accessing
EU
Beijing
(Panel)
US
Faster
Data
Source
cross-region
replicated
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• MySQL tuning
• AWS Aurora
• Vertical scale (upgrade)
• Split cold/hot data
• Convert JOIN to staging tables
Review
Remaining issues:
• Not fully managed (not easily
scalable)
• Analysis limited to certain time
frame
• Adding future logic (index) is
very difficult
• Analysts in Beijing still wastes
a lot of waiting time
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Configurations User-Generated
Volume: small, not scaling much large and growing
Entity: some a few
Beijing: read-write read-only
End-nodes: read-only read-write
Data types
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• The cause of scalability:
• only UG data
• Relationship enforcement:
• not needed in UG data
• Transaction protection:
• lock logic still needed
• Analysis Query:
• we need DB, not relations
All the data should be R ?
Try
DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database refactor
Availability Zone
Amazon
Route 53Players
Amazon S3
Amazon
CloudFront
Availability Zone
ELB
DynamoDB
App
Instance
App
Instance
App
Instance
App
Instance
RDS DB Instance
Standby (Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
Users &
Transactions Data
Products Data
Streaming to
Lambda
Incremental
backup
Static contents
Business Regions( US, Europe)
• Migrate UG data to
DynamoDB
• Keep Configuration in RDS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cross region data synchronize
Availability Zone
Amazon
Route 53Player
s
Amazon
S3
Amazon
CloudFro
nt
Availability Zone
ELB
DynamoD
B
App
Instance
App
Instance
App
Instance
App
Instance
RDS DB
Instance Standby
(Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
Users &
Transactions
Data
Products Data
Business Regions( US,
Europe)
Streaming to
Lambda
Incremental
backup
Static contents
Analysis Region( Asia)
Data Loaders
Cross region
Read Replica
SQSSNS
• RDS cross-region
replica for Configuration
• SNS: At least once
delivery to SQS
• SQS:
Reliable,transactional
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Limitation of DynamoDB:
• not SQL-able
• limited amount of GSI/LSI
• cost unfriendly if you choose to use GSI
• DynamoDB ≠ a choice for analysis data source
What about analysis query?
Let’s add
the R back
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RDB redefined: Redshift
• Have a copy of user data in
Redshift
• Only deploy in panel node
Analysis Region( Asia)
Data Loaders
Redshift
Data warehouse
App servers
ELB
Analysts
Amazon
S3
Cold data backup
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Phase3: Managed services
Availability Zone
Amazon
Route 53Players
Amazon S3
Amazon
CloudFront
Availability Zone
ELB
DynamoDB
App
Instance
App
Instance
App
Instance
App
Instance
RDS DB Instance
Standby (Multi-AZ)
RDS DB Instance
Active (Multi-AZ)
Users &
Transactions Data
Products Data
Business Regions( US, Europe)
Streaming to
Lambda
Incremental
backup
Static contents
Analysis Region( Asia)
Data Loaders
Cross region
Read Replica
Redshift
Data warehouse
App servers
ELB
Analyst
s
Amazon S3
Cold data backup
SQSSNS
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Summary: 3 Levels
Infrastructure
Replacement
External
Services
FaaS
using Lambda
DB & Storage
Alternative
Clustered
Analytics
DevOps
Toolset
Managed Services, as many as you can
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
FUN+: King of Avalon
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS
Availability Zone
Availability Zone
EC
2
EC
2
Amazon
S3
Amazon
Redshift*
Player Internet
gateway
Elastic Load
Balancing
Public Subnet
Public Subnet
Private Subnet
Private Subnet
Web Servers
Web Servers
APP Servers
APP Servers
DB Router
DB Router
Amazon
Route 53
Muliti-AZ
SQL
instance
Amazon
CloudFront endpoints
Muliti-AZ
SQL
instance
........
AWS Data
Pipeline
Amazon EFS
KOA: Asynchronous Online Gaming
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BINLOG DATA DOUBLE-WRITELOG FRM FILES
TYPE OF WRITE
MYSQL WITH REPLICA
EBS mirrorEBS mirror
AZ 1 AZ 2
Amazon S3
EBS
Amazon Elastic
Block Store (EBS)
Primary
Instance
Replica
Instance
1
2
3
4
5
AZ 1 AZ 3
Primary
Instance
Amazon S3
AZ 2
Replica
Instance
ASYNC
4/6 QUORUM
DISTRIBUT
ED WRITES
Replica
Instance
AMAZON AURORA
780K transactions
7,388K I/Os per million txns (excludes mirroring, standby)
Average 7.4 I/Os per transaction
MySQL IO profile for 30 min Sysbench run
27,378K transactions 35X MORE
0.95 I/Os per transaction (6X amplification) 7.7X LESS
Aurora IO profile for 30 min Sysbench run
My SQL VS Aurora
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
MySQL shard consolidation
Master
Read
Replica
Shared distributed
storage volume
M S
M M
M
S S
S
MySQL shards Aurora cluster
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora migration options
Source database From where Recommended option
RDS
EC2, on-premises
EC2, on-premises, RDS
Console based automated
snapshot ingestion and catch
up via binlog replication.
Binary snapshot ingestion
through S3 and catch up via
binlog replication.
Schema conversion using
SCT and data migration via
DMS.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Tap4Fun
A gaming company in Chengdu
Island Empire Galaxy Empire Global Threat Galaxy LegendSpartan WarsKing’s Empire
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
More and more servers..
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation based on AWS API and Tags
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Simplify provisioning
CMDB system replace Excel
Simply and safely
Automatic backup
Resources management even after
termination
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
About tags
Organizations, technical, business, automation, cost, security
Case sensitive
Development or development
Numbers
Static VS Dynamic
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Attack at any time
Highest : 1.5billion qps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DRT
1. Always-on monitoring engages the AWS DDoS
Response Team (DRT)
2. DRT proactively triages DDoS attack
3. DRT creates AWS WAF rules (prior
authorization required)
Proactive DRT engagement
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Attack at any where
Auth
Server
Game
Server
Authentication
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Protection Consolidation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GameLift
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Massively Parallel Data Processing with PyWren and AWS Lambda - SRV424 - re:I...
Massively Parallel Data Processing with PyWren and AWS Lambda - SRV424 - re:I...Massively Parallel Data Processing with PyWren and AWS Lambda - SRV424 - re:I...
Massively Parallel Data Processing with PyWren and AWS Lambda - SRV424 - re:I...
 
CMP319_Easily Coordinate Microservices, Build Serverless Apps, and Automate T...
CMP319_Easily Coordinate Microservices, Build Serverless Apps, and Automate T...CMP319_Easily Coordinate Microservices, Build Serverless Apps, and Automate T...
CMP319_Easily Coordinate Microservices, Build Serverless Apps, and Automate T...
 
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
I Want to Analyze and Visualize Website Access Logs, but Why Do I Need Server...
 
ABD208_Cox Automotive Empowered to Scale with Splunk Cloud & AWS and Explores...
ABD208_Cox Automotive Empowered to Scale with Splunk Cloud & AWS and Explores...ABD208_Cox Automotive Empowered to Scale with Splunk Cloud & AWS and Explores...
ABD208_Cox Automotive Empowered to Scale with Splunk Cloud & AWS and Explores...
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
 
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech TalksAWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
AWS X-Ray: Debugging Applications at Scale - AWS Online Tech Talks
 
ARC205_Born in the Cloud
ARC205_Born in the CloudARC205_Born in the Cloud
ARC205_Born in the Cloud
 
CON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWSCON309_Containerized Machine Learning on AWS
CON309_Containerized Machine Learning on AWS
 
ABD201-Big Data Architectural Patterns and Best Practices on AWS
ABD201-Big Data Architectural Patterns and Best Practices on AWSABD201-Big Data Architectural Patterns and Best Practices on AWS
ABD201-Big Data Architectural Patterns and Best Practices on AWS
 
DAT341_Working with Amazon ElastiCache for Redis
DAT341_Working with Amazon ElastiCache for RedisDAT341_Working with Amazon ElastiCache for Redis
DAT341_Working with Amazon ElastiCache for Redis
 
AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017AWS Commercial Management and Cost Optimisation - Dec 2017
AWS Commercial Management and Cost Optimisation - Dec 2017
 
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
MBL209_Learn How MicroStrategy on AWS is Helping Vivint Solar Deliver Clean E...
 
Launch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech TalksLaunch Applications the Amazon Way - AWS Online Tech Talks
Launch Applications the Amazon Way - AWS Online Tech Talks
 
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
MSC203_How Citrix Uses AWS Marketplace Solutions To Accelerate Analytic Workl...
 
Deploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
Deploying Business Analytics at Enterprise Scale - AWS Online Tech TalksDeploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
Deploying Business Analytics at Enterprise Scale - AWS Online Tech Talks
 
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost EfficiencyARC303_Running Lean Architectures How to Optimize for Cost Efficiency
ARC303_Running Lean Architectures How to Optimize for Cost Efficiency
 
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
Big Data, Analytics and Machine Learning on AWS Lambda - SRV402 - re:Invent 2017
 
GAM301-Migrating the League of Legends Platform into AWS Cloud.pdf
GAM301-Migrating the League of Legends Platform into AWS Cloud.pdfGAM301-Migrating the League of Legends Platform into AWS Cloud.pdf
GAM301-Migrating the League of Legends Platform into AWS Cloud.pdf
 
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@EdgeCTD403_Supercharge Your Websites with the Power of Lambda@Edge
CTD403_Supercharge Your Websites with the Power of Lambda@Edge
 
IOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWSIOT207_Panasonic—Building the Road of the Future on AWS
IOT207_Panasonic—Building the Road of the Future on AWS
 

Similar a 中國AWS遊戲業經驗和架構分享

Similar a 中國AWS遊戲業經驗和架構分享 (20)

How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
How Nextdoor Built a Scalable, Serverless Data Pipeline for Billions of Event...
 
Xây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùng
Xây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùngXây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùng
Xây dựng website và ứng dụng mobile đáp ứng 10 triệu người dùng
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Managed Relational Databases - Amazon RDS
Managed Relational Databases - Amazon RDSManaged Relational Databases - Amazon RDS
Managed Relational Databases - Amazon RDS
 
Deploying SAP Solutions on AWS
Deploying SAP Solutions on AWSDeploying SAP Solutions on AWS
Deploying SAP Solutions on AWS
 
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
A Practitioner’s Guide on Migrating to, and Running on Amazon Aurora - DAT315...
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018
 
STG401_This Is My Architecture
STG401_This Is My ArchitectureSTG401_This Is My Architecture
STG401_This Is My Architecture
 
Deep Dive on New Features in Amazon S3 & Glacier - AWS Online Tech Talks
Deep Dive on New Features in Amazon S3 & Glacier - AWS Online Tech TalksDeep Dive on New Features in Amazon S3 & Glacier - AWS Online Tech Talks
Deep Dive on New Features in Amazon S3 & Glacier - AWS Online Tech Talks
 
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
High-Throughput Genomics on AWS - LFS309 - re:Invent 2017
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
STG316_Optimizing Storage for Big Data Workloads
STG316_Optimizing Storage for Big Data WorkloadsSTG316_Optimizing Storage for Big Data Workloads
STG316_Optimizing Storage for Big Data Workloads
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018
 
Scale Website dan Mobile Applications Anda di AWS hingga 10 juta pengguna
Scale Website dan Mobile Applications Anda di AWS hingga 10 juta penggunaScale Website dan Mobile Applications Anda di AWS hingga 10 juta pengguna
Scale Website dan Mobile Applications Anda di AWS hingga 10 juta pengguna
 
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
SRV331_Build a Multi-Region Serverless Application for Resilience and High Av...
 
Journey Towards Scaling Your API to 10 Million Users
Journey Towards Scaling Your API to 10 Million UsersJourney Towards Scaling Your API to 10 Million Users
Journey Towards Scaling Your API to 10 Million Users
 
AWS Database and Analytics State of the Union
AWS Database and Analytics State of the UnionAWS Database and Analytics State of the Union
AWS Database and Analytics State of the Union
 
Aws Tools for Alexa Skills
Aws Tools for Alexa SkillsAws Tools for Alexa Skills
Aws Tools for Alexa Skills
 
How to build scalable and resilient applications in the cloud - AWS Summit Ca...
How to build scalable and resilient applications in the cloud - AWS Summit Ca...How to build scalable and resilient applications in the cloud - AWS Summit Ca...
How to build scalable and resilient applications in the cloud - AWS Summit Ca...
 

Más 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
 

Más 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
 

中國AWS遊戲業經驗和架構分享

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Zhao Fei Solution Architect 2018-3-8 Chinese gaming customer cases sharing
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda Architect 架构之道 Database 数据之道 Operation 运维之道 Security 安全之道
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Architect
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Oasis Games: A Global Player Over 45games in different genres More than 40countries In 16languages Mobile / Browser / Steam / PS4
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Legacy Oasis Payment Platform Panel Pay Pages
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Phase 1: Infrastructure replacement  Computing  Storage  Network S3 Region Availability Zone A Tools 1. ApacheBench (http://httpd.apache.org/docs/2.2/en/programs/ab.html): simple HTTP web server load test tool 2. Siege (https://www.joedog.org/siege-home/) : HTTP load test and benchmark tool 3. JMeter (http://jmeter.apache.org/) : very famous load test tool based on JAVA, originated from 1998 4. The Grinder (http://grinder.sourceforge.net/): agent based load test framework, Java. 5. Gatling (http://gatling.io/) : Scala load test framework based on Akka and Netty 6. Tsung (http://tsung.erlang-projects.org/) : Erlang load test tool, support HTTP, websocket, databse, MQTT, TCP 7. Bees (https://github.com/newsapps/beeswithmachineguns) : AWS oriented opensource load test tool 8. Vegeta (https://github.com/tsenart/vegeta) : Go based opensource HTTP load test tool 9. RedLine13 (https://www.redline13.com/) : AWS Advanced Tehchnology Partner 10.Loader.io (https://loader.io/): load test service base on Cloud server. 11.Goad (https://goad.io/) : load test using AWS Lambda, based on Go. The result are delivered to AWS SQS.
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Phase 2: External services CloudFront acceleration S3 Route53 Geo IP CloudFront CDN ELB S3 EC2EC2EC2 Region Availability Zone A Availability Zone B TIPS • One regions server is available depends on game types • Use CF for HTTP(s) • Use Proxy Server for TCP • Design your game service allowing min latency ex) buffering, async simple AI • Check all latency in every region.
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Good architect, but.. Availability Zone Amazon Route 53 User Amazon S3 Amazon Cloudfront Availability Zone Elastic Load Balancing RDS DB Instance Read Replica App Instance App Instance App Instance RDS DB Instance Read Replica App Instance App Instance App Instance RDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ)
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 0 20 40 60 80 100 120 2013 2014 2015 Jul, 2016 Total Orders (million) 1st Challenge :Growth & Slow 0 2 4 6 8 10 12 14 16 2013 2014 2015 Jul, 2016 Anaylze Query Cost (s)
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 2nd Challenge: Distributed data accessing EU Beijing (Panel) US Faster Data Source cross-region replicated
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • MySQL tuning • AWS Aurora • Vertical scale (upgrade) • Split cold/hot data • Convert JOIN to staging tables Review Remaining issues: • Not fully managed (not easily scalable) • Analysis limited to certain time frame • Adding future logic (index) is very difficult • Analysts in Beijing still wastes a lot of waiting time
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Configurations User-Generated Volume: small, not scaling much large and growing Entity: some a few Beijing: read-write read-only End-nodes: read-only read-write Data types
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • The cause of scalability: • only UG data • Relationship enforcement: • not needed in UG data • Transaction protection: • lock logic still needed • Analysis Query: • we need DB, not relations All the data should be R ? Try DynamoDB
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database refactor Availability Zone Amazon Route 53Players Amazon S3 Amazon CloudFront Availability Zone ELB DynamoDB App Instance App Instance App Instance App Instance RDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ) Users & Transactions Data Products Data Streaming to Lambda Incremental backup Static contents Business Regions( US, Europe) • Migrate UG data to DynamoDB • Keep Configuration in RDS
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cross region data synchronize Availability Zone Amazon Route 53Player s Amazon S3 Amazon CloudFro nt Availability Zone ELB DynamoD B App Instance App Instance App Instance App Instance RDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ) Users & Transactions Data Products Data Business Regions( US, Europe) Streaming to Lambda Incremental backup Static contents Analysis Region( Asia) Data Loaders Cross region Read Replica SQSSNS • RDS cross-region replica for Configuration • SNS: At least once delivery to SQS • SQS: Reliable,transactional
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Limitation of DynamoDB: • not SQL-able • limited amount of GSI/LSI • cost unfriendly if you choose to use GSI • DynamoDB ≠ a choice for analysis data source What about analysis query? Let’s add the R back
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. RDB redefined: Redshift • Have a copy of user data in Redshift • Only deploy in panel node Analysis Region( Asia) Data Loaders Redshift Data warehouse App servers ELB Analysts Amazon S3 Cold data backup
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Phase3: Managed services Availability Zone Amazon Route 53Players Amazon S3 Amazon CloudFront Availability Zone ELB DynamoDB App Instance App Instance App Instance App Instance RDS DB Instance Standby (Multi-AZ) RDS DB Instance Active (Multi-AZ) Users & Transactions Data Products Data Business Regions( US, Europe) Streaming to Lambda Incremental backup Static contents Analysis Region( Asia) Data Loaders Cross region Read Replica Redshift Data warehouse App servers ELB Analyst s Amazon S3 Cold data backup SQSSNS
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Summary: 3 Levels Infrastructure Replacement External Services FaaS using Lambda DB & Storage Alternative Clustered Analytics DevOps Toolset Managed Services, as many as you can
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Database
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. FUN+: King of Avalon
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Availability Zone Availability Zone EC 2 EC 2 Amazon S3 Amazon Redshift* Player Internet gateway Elastic Load Balancing Public Subnet Public Subnet Private Subnet Private Subnet Web Servers Web Servers APP Servers APP Servers DB Router DB Router Amazon Route 53 Muliti-AZ SQL instance Amazon CloudFront endpoints Muliti-AZ SQL instance ........ AWS Data Pipeline Amazon EFS KOA: Asynchronous Online Gaming
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BINLOG DATA DOUBLE-WRITELOG FRM FILES TYPE OF WRITE MYSQL WITH REPLICA EBS mirrorEBS mirror AZ 1 AZ 2 Amazon S3 EBS Amazon Elastic Block Store (EBS) Primary Instance Replica Instance 1 2 3 4 5 AZ 1 AZ 3 Primary Instance Amazon S3 AZ 2 Replica Instance ASYNC 4/6 QUORUM DISTRIBUT ED WRITES Replica Instance AMAZON AURORA 780K transactions 7,388K I/Os per million txns (excludes mirroring, standby) Average 7.4 I/Os per transaction MySQL IO profile for 30 min Sysbench run 27,378K transactions 35X MORE 0.95 I/Os per transaction (6X amplification) 7.7X LESS Aurora IO profile for 30 min Sysbench run My SQL VS Aurora
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. MySQL shard consolidation Master Read Replica Shared distributed storage volume M S M M M S S S MySQL shards Aurora cluster
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Aurora migration options Source database From where Recommended option RDS EC2, on-premises EC2, on-premises, RDS Console based automated snapshot ingestion and catch up via binlog replication. Binary snapshot ingestion through S3 and catch up via binlog replication. Schema conversion using SCT and data migration via DMS.
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Operation
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Tap4Fun A gaming company in Chengdu Island Empire Galaxy Empire Global Threat Galaxy LegendSpartan WarsKing’s Empire
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. More and more servers..
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Operation based on AWS API and Tags
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Simplify provisioning CMDB system replace Excel Simply and safely Automatic backup Resources management even after termination
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. About tags Organizations, technical, business, automation, cost, security Case sensitive Development or development Numbers Static VS Dynamic
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Security
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Attack at any time Highest : 1.5billion qps
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DRT 1. Always-on monitoring engages the AWS DDoS Response Team (DRT) 2. DRT proactively triages DDoS attack 3. DRT creates AWS WAF rules (prior authorization required) Proactive DRT engagement
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Attack at any where Auth Server Game Server Authentication
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Protection Consolidation
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. GameLift
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you!