SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

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

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

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

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

Notas del editor

  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)