SlideShare une entreprise Scribd logo
1  sur  20
Everything I Learned About
Scaling Online Games I
Learned at Google and
eBay
Randy Shoup
@randyshoup
linkedin.com/in/randyshoup
Background
CTO at KIXEYE
• Making awesome games awesomer (and
scalabler and reliabler)
Director of Engineering for Google App
Engine
• World’s largest Platform-as-a-Service
Chief Engineer at eBay
• Multiple generations of eBay’s real-time
search infrastructure
Engineering “Fun”
Whole user / player experience
• Think holistically about the full end-to-end
experience of the user
• UX, functionality, performance, bugs, etc.
All useful metrics are *proxies* for fun
• Performance: load time, frame rate, lag
• Technology: latency, availability
• Business: acquisition, retention, monetization
Real-Time Strategy Games are
…
Real-time
Spiky
Diverse
Constantly evolving
Constantly pushing boundaries
 Technically and operationally demanding
Know Your Requirements
Less is more
• More wood, fewer arrows
• Solve 100% of one problem rather than 50%
of two
• Release one great feature instead of two iffy
ones
Understand the requirements
• e.g., Battle replay
• Ephemeral combat
• Immutable recording
• Manageable storage footprint
Know Your Bottlenecks
Log everything
Monitor relentlessly
Measure bottlenecks and attack the first
• “When you solve problem one, problem two gets
a promotion”
• Theory of Constraints: attacking *any* other
problem yields no improvement
Accept that your intuition is WRONG (!)
Know Your Distributions
“Normal” distribution is *not* normal
• Only works for quantities physically
constrained on both sides, clustered around a
mean
• E.g., adult height or weight
Leads to invalid analysis and conclusions
• Removing outliers
• Ignoring real problems
• Your (trained) intuition is WRONG (!)
Know Your Distributions
Exponential (“Long Tail”) distribution *much*
more common
• Income, latency, human connections, etc.
• Also easy to reason about – only single
parameter
Percentiles are your best friends (!)
• Reasonably characterize any distribution
• Measure 90%ile, 99%ile, 99.9%ile
• Focus on the real problems
• Mean and Standard Deviation are useless
Layering and Responsibility
Multiple layers
• Client
• Game server
• Services
• Persistence
Clarify roles and responsibilities
• Client- vs. server-authoritative
• Google service layering (+)
Distribution of Data / Work
Load-balancing (for stateless work)
• Web servers, proxies
• Most services
Sharding (for stateful work)
• Combat servers
• Matchmaking
• Leaderboards
• Databases
Services
Simple, well-defined interface
Single-purpose
Modular and independent
Small team
Autonomy and responsibility
Component Isolation
Combat server for TOME
• Highly “twitchy” real-time MOBA combat
• Very latency-sensitive
Real-time interactions isolated to a single,
ephemeral component
• No coordination with any central service
Highly dynamic load distribution
• Router assigns battle to least-loaded server
• Requires latency-fairness between players
Asynchrony: Do Work Up Front
Custom asset pipeline
• Spriting, compression, etc
Pre-render “movies” instead of real-time
particle effects
Tons of caching
Asynchrony: Client Liveness
Client continues seamlessly if disconnected
• Gameplay more important than immediate
synchronization
Event loop for rendering
• Keep up with the frame rate (!)
Default to background processing
• Refresh assets
• Save client state
Asynchrony: Reactive Server
Minimize request latency
• Respond as rapidly as possible to client
• Queue events / messages for complex work
• Service interactions via reliable events
Functional Reactive programming
• Heavy use of Scala and Akka
• Never block (!)
• eBay, Google programming models (-)
Small, Independent Teams
Studio System
• Full-stack, independent game teams
• Near-complete autonomy on technology
choices, development processes
Vendor-customer discipline
• Google service teams (+)
Reduces contention and coherence
Hire and Retain Top People
Hire „A‟ Players
• Difference between top and bottom
performers is not 1.5x; it’s 10x (!)
• (+) Google hiring process
Virtuous Cycle
• A players bring A players
• B players bring C players
• Constantly raise the bar
Reduces contention and coherence
Play to People‟s Strengths
People are not cogs, not fungible
• (-) eBay “Train seats”
• Destroyed incentives, personal pride, long-term
ownership
Align work with skills and passion
• Symphony instead of Factory (!)
• Skills in Flash, Scala, etc.
• Build customizability for target developer, not
builder (DSL >> code)
Small Details Matter
In the very large, the very small matters a
*lot*
• Subatomic physics and cosmology
• eBay and variable-byte encoding (+)
• GAE and memcache slab memory allocation
(+)
Discipline is *which* details matter
• Combat server and memory contention
• 40% improvement from six characters …
• “const ”
Join us!
www.kixeye.com [jobs]

Contenu connexe

Plus de Randy Shoup

An Agile Approach to Machine Learning
An Agile Approach to Machine LearningAn Agile Approach to Machine Learning
An Agile Approach to Machine Learning
Randy Shoup
 
DevOps - It's About How We Work
DevOps - It's About How We WorkDevOps - It's About How We Work
DevOps - It's About How We Work
Randy Shoup
 
Ten Lessons of the DevOps Transition
Ten Lessons of the DevOps TransitionTen Lessons of the DevOps Transition
Ten Lessons of the DevOps Transition
Randy Shoup
 

Plus de Randy Shoup (20)

Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Anatomy of Three Incidents -- Commonalities and Lessons
Anatomy of Three Incidents -- Commonalities and LessonsAnatomy of Three Incidents -- Commonalities and Lessons
Anatomy of Three Incidents -- Commonalities and Lessons
 
One Terrible Day at Google, and How It Made Us Better
One Terrible Day at Google, and How It Made Us BetterOne Terrible Day at Google, and How It Made Us Better
One Terrible Day at Google, and How It Made Us Better
 
Scaling Your Architecture for the Long Term
Scaling Your Architecture for the Long TermScaling Your Architecture for the Long Term
Scaling Your Architecture for the Long Term
 
Minimal Viable Architecture - Silicon Slopes 2020
Minimal Viable Architecture - Silicon Slopes 2020Minimal Viable Architecture - Silicon Slopes 2020
Minimal Viable Architecture - Silicon Slopes 2020
 
An Agile Approach to Machine Learning
An Agile Approach to Machine LearningAn Agile Approach to Machine Learning
An Agile Approach to Machine Learning
 
Moving Fast at Scale
Moving Fast at ScaleMoving Fast at Scale
Moving Fast at Scale
 
Breaking Codes, Designing Jets, and Building Teams
Breaking Codes, Designing Jets, and Building TeamsBreaking Codes, Designing Jets, and Building Teams
Breaking Codes, Designing Jets, and Building Teams
 
Scaling Your Architecture with Services and Events
Scaling Your Architecture with Services and EventsScaling Your Architecture with Services and Events
Scaling Your Architecture with Services and Events
 
Learning from Learnings: Anatomy of Three Incidents
Learning from Learnings: Anatomy of Three IncidentsLearning from Learnings: Anatomy of Three Incidents
Learning from Learnings: Anatomy of Three Incidents
 
Minimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good EnoughMinimum Viable Architecture - Good Enough is Good Enough
Minimum Viable Architecture - Good Enough is Good Enough
 
Managing Data at Scale - Microservices and Events
Managing Data at Scale - Microservices and EventsManaging Data at Scale - Microservices and Events
Managing Data at Scale - Microservices and Events
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at Scale
 
Monoliths, Migrations, and Microservices
Monoliths, Migrations, and MicroservicesMonoliths, Migrations, and Microservices
Monoliths, Migrations, and Microservices
 
Evolving Architecture and Organization - Lessons from Google and eBay
Evolving Architecture and Organization - Lessons from Google and eBayEvolving Architecture and Organization - Lessons from Google and eBay
Evolving Architecture and Organization - Lessons from Google and eBay
 
Moving Fast At Scale
Moving Fast At ScaleMoving Fast At Scale
Moving Fast At Scale
 
DevOps - It's About How We Work
DevOps - It's About How We WorkDevOps - It's About How We Work
DevOps - It's About How We Work
 
Ten Lessons of the DevOps Transition
Ten Lessons of the DevOps TransitionTen Lessons of the DevOps Transition
Ten Lessons of the DevOps Transition
 
Managing Data in Microservices
Managing Data in MicroservicesManaging Data in Microservices
Managing Data in Microservices
 
Effective Microservices In a Data-centric World
Effective Microservices In a Data-centric WorldEffective Microservices In a Data-centric World
Effective Microservices In a Data-centric World
 

Dernier

valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
Wadgaon Sheri $ Call Girls Pune 10k @ I'm VIP Independent Escorts Girls 80057...
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 

Everything I Learned About Scaling Online Games I Learned at Google and eBay [Part 1, QConSF 2013]

  • 1. Everything I Learned About Scaling Online Games I Learned at Google and eBay Randy Shoup @randyshoup linkedin.com/in/randyshoup
  • 2. Background CTO at KIXEYE • Making awesome games awesomer (and scalabler and reliabler) Director of Engineering for Google App Engine • World’s largest Platform-as-a-Service Chief Engineer at eBay • Multiple generations of eBay’s real-time search infrastructure
  • 3. Engineering “Fun” Whole user / player experience • Think holistically about the full end-to-end experience of the user • UX, functionality, performance, bugs, etc. All useful metrics are *proxies* for fun • Performance: load time, frame rate, lag • Technology: latency, availability • Business: acquisition, retention, monetization
  • 4. Real-Time Strategy Games are … Real-time Spiky Diverse Constantly evolving Constantly pushing boundaries  Technically and operationally demanding
  • 5. Know Your Requirements Less is more • More wood, fewer arrows • Solve 100% of one problem rather than 50% of two • Release one great feature instead of two iffy ones Understand the requirements • e.g., Battle replay • Ephemeral combat • Immutable recording • Manageable storage footprint
  • 6. Know Your Bottlenecks Log everything Monitor relentlessly Measure bottlenecks and attack the first • “When you solve problem one, problem two gets a promotion” • Theory of Constraints: attacking *any* other problem yields no improvement Accept that your intuition is WRONG (!)
  • 7. Know Your Distributions “Normal” distribution is *not* normal • Only works for quantities physically constrained on both sides, clustered around a mean • E.g., adult height or weight Leads to invalid analysis and conclusions • Removing outliers • Ignoring real problems • Your (trained) intuition is WRONG (!)
  • 8. Know Your Distributions Exponential (“Long Tail”) distribution *much* more common • Income, latency, human connections, etc. • Also easy to reason about – only single parameter Percentiles are your best friends (!) • Reasonably characterize any distribution • Measure 90%ile, 99%ile, 99.9%ile • Focus on the real problems • Mean and Standard Deviation are useless
  • 9. Layering and Responsibility Multiple layers • Client • Game server • Services • Persistence Clarify roles and responsibilities • Client- vs. server-authoritative • Google service layering (+)
  • 10. Distribution of Data / Work Load-balancing (for stateless work) • Web servers, proxies • Most services Sharding (for stateful work) • Combat servers • Matchmaking • Leaderboards • Databases
  • 11. Services Simple, well-defined interface Single-purpose Modular and independent Small team Autonomy and responsibility
  • 12. Component Isolation Combat server for TOME • Highly “twitchy” real-time MOBA combat • Very latency-sensitive Real-time interactions isolated to a single, ephemeral component • No coordination with any central service Highly dynamic load distribution • Router assigns battle to least-loaded server • Requires latency-fairness between players
  • 13. Asynchrony: Do Work Up Front Custom asset pipeline • Spriting, compression, etc Pre-render “movies” instead of real-time particle effects Tons of caching
  • 14. Asynchrony: Client Liveness Client continues seamlessly if disconnected • Gameplay more important than immediate synchronization Event loop for rendering • Keep up with the frame rate (!) Default to background processing • Refresh assets • Save client state
  • 15. Asynchrony: Reactive Server Minimize request latency • Respond as rapidly as possible to client • Queue events / messages for complex work • Service interactions via reliable events Functional Reactive programming • Heavy use of Scala and Akka • Never block (!) • eBay, Google programming models (-)
  • 16. Small, Independent Teams Studio System • Full-stack, independent game teams • Near-complete autonomy on technology choices, development processes Vendor-customer discipline • Google service teams (+) Reduces contention and coherence
  • 17. Hire and Retain Top People Hire „A‟ Players • Difference between top and bottom performers is not 1.5x; it’s 10x (!) • (+) Google hiring process Virtuous Cycle • A players bring A players • B players bring C players • Constantly raise the bar Reduces contention and coherence
  • 18. Play to People‟s Strengths People are not cogs, not fungible • (-) eBay “Train seats” • Destroyed incentives, personal pride, long-term ownership Align work with skills and passion • Symphony instead of Factory (!) • Skills in Flash, Scala, etc. • Build customizability for target developer, not builder (DSL >> code)
  • 19. Small Details Matter In the very large, the very small matters a *lot* • Subatomic physics and cosmology • eBay and variable-byte encoding (+) • GAE and memcache slab memory allocation (+) Discipline is *which* details matter • Combat server and memory contention • 40% improvement from six characters … • “const ”