SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Scalability and Load in Online Games
1
James Gwertzman
@gwertz
Promise & peril of live game operations
• Launched 3/2/12
• Shot to top 10
• Servers crashed
• Offline for 168 days
• $27M lost revenue
• Re-launched 8/17/12
• Top-grossing game for nearly 3 years
LTD revenue: $150M+
Source: AppAnnie, NPD, ThinkGaming
2
Updated more than 45 times
Rank history for top grossing games, iOS in United States
Build game
Launch
The old days…
Build game
Build
backend
Launch
Build tools for
ops team
Segment &
target customers
Deploy servers
Business
intelligence
Offers &
Promotions
Update
content
Host in-game
events
Customer
service
Nowadays…
Business
intelligence
User
Acquisition
Characteristics of live games
• Many more writes than reads (primarily driven by analytics)
• Authoritative server-side game logic (to prevent cheating)
• Millions of users (often with transient relationships)
• Peak load often hits on day one of release
• Must be scalable, global, and reliable all at once
• Game studios often inexperienced at large-scale system design
• Testing w/ real user “stories” at scale is hard but critical
5
+
Live ops tools and dashboards
(mission control for the whole team)
Back-end services
(cross-platform, one-stop shop)
+
Integration with other partners
(building out a full ecosystem)
and many more coming...
6
Typical backend services
• Player Accounts
– Authentication
– Profile Management
– Account Linking
• Data Storage
– Per player
– Per title
– Per character (under one player)
– Files / CDN delivery
• Commerce
– Catalog Management
– Virtual Currencies
– Player Inventory
– In-game Purchasing
– Receipt validation (Apple/Google/Amazon)
– Marketing and Promotion
• In-game Marketing
– Push Notifications
– In-game Messaging
• Product Management
– Analytics and Reporting
– Customer Segmentation
– Customer Support Tools
– Abuse Reporting and Banning
• Social
– Friends Lists
– Player Chat
– Leaderboards
– Game forum integration
– Trading / gifting
• Multiplayer
– Photon integration (real-time / turn-based)
– Matchmaking
– Custom game server hosting
– Server monitoring
• Game logic
– Server-hosted JavaScript
7
Availability Zone B
Oregon
AWS cloud: PlayFab Web Services
Amazon Route 53
(3.playfabapi.com)
Amazon EC2
(API handling)
Matchmaker
Instance
Instance
Game Server
Monitor
DynamoDB Amazon RDS Amazon S3 Amazon RedshiftReports
service
Instance
Logs
Architecture Overview
Matchmaker
(Secondary)
Instance
Virginia
Availability Zone A
Amazon EC2
(API handling)
Elastic Load Balancing
Cross-zone storage
Game Client
Game Manager
(Dashboards)
Amazon EC2
(Virtual game
servers)
Tokyo
Amazon EC2
(Virtual game
servers)
Sydney
Physical game
servers
Physical game
servers
Amazon EC2
(Virtual game
servers)
Local disk Local disk Local disk
Physical game
servers
Dealing with elastic load
• Peak load is often launch day
– Hard to predict actual load
• We solve using elastic
compute & storage solutions
• No transaction support in DB,
so must solve at logic level
9
Applying actions to user segments
• Users are grouped into
segments based on behavior
• Games apply actions to
segments
– Send a push notification
– Grant an item
• Need both batch and real-time
processing
• We use a hybrid model, with
duplicate storage
– Redshift for bulk actions
– DynamoDB for individual triggers
10
Global state for matchmaking
• Matching users for a game is
harder than it sounds
– Millions of players
– Must be atomic
– Lots of state and complex rules
• We use a single server, w/
fallover
– State is written though to DB
– If primary fails, secondary reads in
state from DB and takes over
– This happens very quickly…
11
Thank you
James Gwertzman (james@playfab.com)
@gwertz or @playfabnetwork
Create a free account today at www.playfab.com
12

Weitere ähnliche Inhalte

Mehr von James Gwertzman

Introducing PlayFab -- Effective LiveOps
Introducing PlayFab -- Effective LiveOpsIntroducing PlayFab -- Effective LiveOps
Introducing PlayFab -- Effective LiveOpsJames Gwertzman
 
The Future is Operations: Why Mobile Games Need Backends
The Future is Operations: Why Mobile Games Need BackendsThe Future is Operations: Why Mobile Games Need Backends
The Future is Operations: Why Mobile Games Need BackendsJames Gwertzman
 
Running live game events for fun and profit
Running live game events for fun and profitRunning live game events for fun and profit
Running live game events for fun and profitJames Gwertzman
 
Technical Disruption and a New Golden Era of Games
Technical Disruption and a New Golden Era of GamesTechnical Disruption and a New Golden Era of Games
Technical Disruption and a New Golden Era of GamesJames Gwertzman
 
Effective LiveOps Strategies for F2P Games
Effective LiveOps Strategies for F2P GamesEffective LiveOps Strategies for F2P Games
Effective LiveOps Strategies for F2P GamesJames Gwertzman
 
OMG! Zombies on the Great Wall of China!
OMG! Zombies on the Great Wall of China!OMG! Zombies on the Great Wall of China!
OMG! Zombies on the Great Wall of China!James Gwertzman
 
Fail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to QualityFail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to QualityJames Gwertzman
 
The Making of PopCap's Plants vs Zombies
The Making of PopCap's Plants vs ZombiesThe Making of PopCap's Plants vs Zombies
The Making of PopCap's Plants vs ZombiesJames Gwertzman
 
Social Games in China - The New Import/Export Business!
Social Games in China - The New Import/Export Business!Social Games in China - The New Import/Export Business!
Social Games in China - The New Import/Export Business!James Gwertzman
 
Lessons learned from SNS games at PopCap
Lessons learned from SNS games at PopCapLessons learned from SNS games at PopCap
Lessons learned from SNS games at PopCapJames Gwertzman
 
What to do when it all goes to hell
What to do when it all goes to hellWhat to do when it all goes to hell
What to do when it all goes to hellJames Gwertzman
 
Definitive Guide To Funding Your Video Game Masterpiece
Definitive Guide To Funding Your Video Game MasterpieceDefinitive Guide To Funding Your Video Game Masterpiece
Definitive Guide To Funding Your Video Game MasterpieceJames Gwertzman
 
Pop Cap’s First Year In China
Pop Cap’s First Year In ChinaPop Cap’s First Year In China
Pop Cap’s First Year In ChinaJames Gwertzman
 

Mehr von James Gwertzman (16)

Optimizing for Change
Optimizing for ChangeOptimizing for Change
Optimizing for Change
 
Introducing PlayFab -- Effective LiveOps
Introducing PlayFab -- Effective LiveOpsIntroducing PlayFab -- Effective LiveOps
Introducing PlayFab -- Effective LiveOps
 
Epic Fails in LiveOps
Epic Fails in LiveOpsEpic Fails in LiveOps
Epic Fails in LiveOps
 
The Future is Operations: Why Mobile Games Need Backends
The Future is Operations: Why Mobile Games Need BackendsThe Future is Operations: Why Mobile Games Need Backends
The Future is Operations: Why Mobile Games Need Backends
 
Running live game events for fun and profit
Running live game events for fun and profitRunning live game events for fun and profit
Running live game events for fun and profit
 
Technical Disruption and a New Golden Era of Games
Technical Disruption and a New Golden Era of GamesTechnical Disruption and a New Golden Era of Games
Technical Disruption and a New Golden Era of Games
 
Effective LiveOps Strategies for F2P Games
Effective LiveOps Strategies for F2P GamesEffective LiveOps Strategies for F2P Games
Effective LiveOps Strategies for F2P Games
 
OMG! Zombies on the Great Wall of China!
OMG! Zombies on the Great Wall of China!OMG! Zombies on the Great Wall of China!
OMG! Zombies on the Great Wall of China!
 
Fail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to QualityFail Fast: PopCap's Approach to Quality
Fail Fast: PopCap's Approach to Quality
 
The Making of PopCap's Plants vs Zombies
The Making of PopCap's Plants vs ZombiesThe Making of PopCap's Plants vs Zombies
The Making of PopCap's Plants vs Zombies
 
Social Games in China - The New Import/Export Business!
Social Games in China - The New Import/Export Business!Social Games in China - The New Import/Export Business!
Social Games in China - The New Import/Export Business!
 
Lessons learned from SNS games at PopCap
Lessons learned from SNS games at PopCapLessons learned from SNS games at PopCap
Lessons learned from SNS games at PopCap
 
Career Day Advice
Career Day AdviceCareer Day Advice
Career Day Advice
 
What to do when it all goes to hell
What to do when it all goes to hellWhat to do when it all goes to hell
What to do when it all goes to hell
 
Definitive Guide To Funding Your Video Game Masterpiece
Definitive Guide To Funding Your Video Game MasterpieceDefinitive Guide To Funding Your Video Game Masterpiece
Definitive Guide To Funding Your Video Game Masterpiece
 
Pop Cap’s First Year In China
Pop Cap’s First Year In ChinaPop Cap’s First Year In China
Pop Cap’s First Year In China
 

Kürzlich hochgeladen

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Scalability and Load in Online Games

  • 1. Scalability and Load in Online Games 1 James Gwertzman @gwertz
  • 2. Promise & peril of live game operations • Launched 3/2/12 • Shot to top 10 • Servers crashed • Offline for 168 days • $27M lost revenue • Re-launched 8/17/12 • Top-grossing game for nearly 3 years LTD revenue: $150M+ Source: AppAnnie, NPD, ThinkGaming 2 Updated more than 45 times Rank history for top grossing games, iOS in United States
  • 4. Build game Build backend Launch Build tools for ops team Segment & target customers Deploy servers Business intelligence Offers & Promotions Update content Host in-game events Customer service Nowadays… Business intelligence User Acquisition
  • 5. Characteristics of live games • Many more writes than reads (primarily driven by analytics) • Authoritative server-side game logic (to prevent cheating) • Millions of users (often with transient relationships) • Peak load often hits on day one of release • Must be scalable, global, and reliable all at once • Game studios often inexperienced at large-scale system design • Testing w/ real user “stories” at scale is hard but critical 5
  • 6. + Live ops tools and dashboards (mission control for the whole team) Back-end services (cross-platform, one-stop shop) + Integration with other partners (building out a full ecosystem) and many more coming... 6
  • 7. Typical backend services • Player Accounts – Authentication – Profile Management – Account Linking • Data Storage – Per player – Per title – Per character (under one player) – Files / CDN delivery • Commerce – Catalog Management – Virtual Currencies – Player Inventory – In-game Purchasing – Receipt validation (Apple/Google/Amazon) – Marketing and Promotion • In-game Marketing – Push Notifications – In-game Messaging • Product Management – Analytics and Reporting – Customer Segmentation – Customer Support Tools – Abuse Reporting and Banning • Social – Friends Lists – Player Chat – Leaderboards – Game forum integration – Trading / gifting • Multiplayer – Photon integration (real-time / turn-based) – Matchmaking – Custom game server hosting – Server monitoring • Game logic – Server-hosted JavaScript 7
  • 8. Availability Zone B Oregon AWS cloud: PlayFab Web Services Amazon Route 53 (3.playfabapi.com) Amazon EC2 (API handling) Matchmaker Instance Instance Game Server Monitor DynamoDB Amazon RDS Amazon S3 Amazon RedshiftReports service Instance Logs Architecture Overview Matchmaker (Secondary) Instance Virginia Availability Zone A Amazon EC2 (API handling) Elastic Load Balancing Cross-zone storage Game Client Game Manager (Dashboards) Amazon EC2 (Virtual game servers) Tokyo Amazon EC2 (Virtual game servers) Sydney Physical game servers Physical game servers Amazon EC2 (Virtual game servers) Local disk Local disk Local disk Physical game servers
  • 9. Dealing with elastic load • Peak load is often launch day – Hard to predict actual load • We solve using elastic compute & storage solutions • No transaction support in DB, so must solve at logic level 9
  • 10. Applying actions to user segments • Users are grouped into segments based on behavior • Games apply actions to segments – Send a push notification – Grant an item • Need both batch and real-time processing • We use a hybrid model, with duplicate storage – Redshift for bulk actions – DynamoDB for individual triggers 10
  • 11. Global state for matchmaking • Matching users for a game is harder than it sounds – Millions of players – Must be atomic – Lots of state and complex rules • We use a single server, w/ fallover – State is written though to DB – If primary fails, secondary reads in state from DB and takes over – This happens very quickly… 11
  • 12. Thank you James Gwertzman (james@playfab.com) @gwertz or @playfabnetwork Create a free account today at www.playfab.com 12

Hinweis der Redaktion

  1. Load of King.com – 140M DAU, probably 300K RPS Consider the Simpsons Tapped out.. It was a top 10 game for more than a year, and even now is still in top 100 nearly 3 years after launch. That’s enviable. But it also had a rocky start. Launched, hit top 10, then had to be taken down for 4 months as the back-end was rebuilt. This is tricky stuff to get right.
  2. Consider how building a game has evolved. It used to be you’d build a game, ship it, and move on.
  3. Now, however, games have becomes services, and suddenly launching the game is only the beginning. There’s all this other stuff that has to happen AFTER the game goes live – the service has to be managed. (talk about the flow) Costs include: Technology cost People cost (burn out) Continuously reacting to competitors
  4. Our goal is to cover all the core services you might need… and to integrate third party services to fill in the areas we don’t cover
  5. Three primary areas: Game Client Game services Multiplayer Game Servers (physical and AWS)