to millions of summoners
play

TO MILLIONS OF SUMMONERS SCOTT DELAP SCALABILITY ARCHITECT GDC 2012 - PowerPoint PPT Presentation

TO MILLIONS OF SUMMONERS SCOTT DELAP SCALABILITY ARCHITECT GDC 2012 ABOUT ME SCOTT DELAP Scalability Architect Joined Riot in 2008 About a year before beta @scottdelap sdelap@riotgames.com ABOUT RIOT GAMES 500+ OFFICES IN FOUNDED


  1. TO MILLIONS OF SUMMONERS SCOTT DELAP SCALABILITY ARCHITECT GDC 2012

  2. ABOUT ME – SCOTT DELAP Scalability Architect Joined Riot in 2008 About a year before beta @scottdelap sdelap@riotgames.com

  3. ABOUT RIOT GAMES 500+ OFFICES IN FOUNDED SANTA MONICA, SEPT.2006 EMPLOYEES ST. LOUIS, DUBLIN, SEOUL

  4. OUR MISSION TO BE THE MOST PLAYER-FOCUSED GAME COMPANY IN THE WORLD.

  5. LEAGUE OF LEGENDS: INTRO July 2011 November 2011 15 MIL REGISTERED 32.5 MIL REGISTERED 4 MIL MONTHLY 11.5 MIL MONTHLY 1.4 MIL DAILY 4.2 MIL DAILY 0.5 MIL PEAK CCU 1.3 MIL PEAK CCU 3.7 MIL DAILY HRS 10.5 MIL DAILY HRS

  6. A UNIQUE SCALING CHALLENGE Social elements GAME FEATURES require uniform access DO NOT ALWAYS SUPPORT TRADITIONAL DECOMPOSITION Crafting an enjoyable user experience

  7. MEETS THESE NEEDS?

  8. AGENDA EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  9. PROBLEM #1: HOW DO WE DEVELOP A SYSTEM RAPIDLY … …WHILE PLANNING FOR FUTURE CAPACITY NEEDS ?

  10. LEAGUE OF LEGENDS: TECH OVERVIEW CLIENT EXPERIENCE PvP.net Adobe Air Flex Game Client C DirectX SERVER SIDE STACK Apache Tomcat PHP Game Servers Spring Cake Game Servers ActiveMQ MySQL Game Servers Coherence Game Servers Hibernate MySQL

  11. TODAY’S FOCUS CLIENT EXPERIENCE PvP.net Adobe Air Flex Game Client C DirectX SERVER SIDE STACK Apache Tomcat PHP Game Servers Spring Cake Game Servers ActiveMQ MySQL Game Servers Coherence Game Servers Hibernate MySQL

  12. A TECH STACK WITH NEW AND OLD ELEMENTS Apache Tomcat Apache Tomcat Apache Tomcat Spring Spring Spring Coherence Coherence Coherence Coherence Hibernate Hibernate Hibernate Hibernate MySQL

  13. BENEFITS OF TRADITIONAL JAVA MATURE OPEN SOURCE ECOSYSTEM ESTABLISHED TOOLS LARGE POOL OF TALENTED DEVELOPERS

  14. ACCELERATING THE FOUNDATION WITH NoSQL NoSQL SOLUTION ORACLE COHERENCE DATA STORED IN CACHES BY KEY NUMEROUS USES PROVIDES ELASTICITY

  15. NoSQL ENABLING RAPID GROWTH Horizontal scaling of Coherence greatly 1 simplified absorbing CCU growth over time Design patterns enforced by Coherence 2 promoted feature level scaling as well

  16. CACHING IN DETAIL DAO HIBERNATE COHERENCE SHARDING LOGIC MySQL AT APPLICATION LEVEL

  17. EMBRACING CACHE ADVANTAGES DAO HIBERNATE COHERENCE MySQL

  18. EMBRACING CACHE ADVANTAGES DAO COHERENCE HIBERNATE MySQL

  19. LEVERAGING ADVANTAGES GRID COMPUTING TRANSPARENT PARTITIONING

  20. AGENDA EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  21. PROBLEM #2: HOW DO WE QUICKLY DEVELOP NEW FEATURES … …WHILE LIMITING BUGS?

  22. SIMPLE IS BEST 3 BILLION MODERN CPU INSTRUCTIONS/SECOND FAST JAVA MEMORY NETWORK

  23. Complexity is the enemy of quality DON’T OVER DESIGN

  24. RIG THE GAME Divide inputs of algorithm, Continually coordinate then parallel process

  25. RIG THE GAME THREAD 1 THREAD 2 Work Work Data Coordination Work Work Data Work Work Data Work Work Data Coordination Coordination Work Work Data

  26. RIG THE GAME Data Data Data Data Data THREAD 1 THREAD 2

  27. RIG THE GAME THREAD 1 THREAD 2 Work Work Data Data Work Work Work Work Data Data Work Work Work Work Data Data

  28. AGENDA EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  29. PROBLEM #3: HOW DO WE HANDLE NOT JUST MONTHLY CHANGE … …BUT HOURLY CHANGE ?

  30. CODE A DYNAMIC SYSTEM HARDWARE FAILURES LARGE SYSTEM CHANGES AS IT’S RUNNING

  31. CODE A DYNAMIC SYSTEM HARDWARE FAILURES LARGE SYSTEM CHANGES AS IT’S RUNNING FIX? Next release? During downtime?

  32. CODE A DYNAMIC SYSTEM HARDWARE FAILURES LARGE SYSTEM CHANGES AS IT’S RUNNING FIX? Next release? During downtime?

  33. CODE A DYNAMIC SYSTEM TECHNOLOGIES W/ ELASTIC PROPERTIES Dynamic Cluster Stateless Growth Recomposition Patterns NOT EVERY PIECE OF YOUR STACK HAS TO BE ELASTIC

  34. CODE A DYNAMIC SYSTEM All relevant configuration properties 1 are dynamic Coherence near caches used to propagate 2 changes to nodes dynamically Algorithms written so they are aware their 3 variables may change while running

  35. LARGER EXAMPLES OF DYNAMIC BEHAVIOR THREAD POOLS = DYNAMICALLY CONFIGURABLE Entire machine/feature combinations can be deployed & updated Features can be deployed in advance of Hotfixes require less downtime release windows

  36. AGENDA EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  37. PROBLEM #4: WHAT HAPPENS WHEN WE FOLLOW ALL THE RULES … …AND STILL RUN INTO ISSUES ?

  38. SCALING BEST PRACTICES HAVE CONSEQUENCES Scaling is hard 1 Let’s get rid of some things so can do this easier 2 What do we get rid of? I can’t decide… 3 Plan B…instead of what you can’t do, I’ll tell you what you can 4 Follow these X rules and everything will be fine 5

  39. SCALING BEST PRACTICES HAVE CONSEQUENCES MAP REDUCE NoSQL CAP If all problems can be written with a I’m taking away Pick two… map step and a your joins… reduce step…

  40. CONSEQUENCES Blog Entry ATOMIC OPERATIONS OFTEN BECOME SCOPED BY ENTRY VALUES AND ROOT OBJECTS

  41. CONSEQUENCES COMMENT Blog Entry ATOMIC OPERATIONS OFTEN BECOME SCOPED BY ENTRY VALUES AND ROOT OBJECTS

  42. CONSEQUENCES COMMENT Blog Entry ATOMIC OPERATIONS OFTEN BECOME SCOPED BY ENTRY VALUES AND ROOT OBJECTS

  43. AN EXAMPLE OF A MISMATCH SERVER ROOT OBJECT AS GAMES ARE ALLOCATED, CHILD OBJECTS ARE ADDED

  44. AN EXAMPLE OF A MISMATCH COMPLEXITY OF GAMES CHILD OBJECTS PER SERVER

  45. ROOT OBJECTS AND CHILD OBJECTS MACHINE Game Instance Name State Players Game Instance Name State Players Game Instance Name State Players

  46. EVOLUTION OF AN ANTI-PATTERN MACHINE Child Object Child Object Child Object Child Object Child Object Child Object 2-50k 2-50k 2-50k 2-50k 2-50k 2-50k >500k <20k NETWORK TRANSFER FAST OBJECT SERIALIZATION BOUNDING FACTORS

  47. THE PIPE IS FULL MACHINE MACHINE MACHINE MACHINE MACHINE Game Game Game Game Game Instance Instance Instance Instance Instance Game Game Game Game Game Instance Instance Instance Instance Instance Game Game Game Game Game Instance Instance Instance Instance Instance

  48. DO WE REALLY HAVE ONE OBJECT? MACHINE Game Game Game Game Instance Instance Instance Instance Name Players State State State

  49. SMALLER IS BETTER! MACHINE MACHINE Game Game Game Game Game Game Instance Instance Instance Instance Instance Instance State State State State State State MACHINE MACHINE MACHINE Game Game Game Game Game Game Game Game Game Instance Instance Instance Instance Instance Instance Instance Instance Instance State State State State State State State State State

  50. AGENDA EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  51. PROBLEM #5: HOW DO WE KNOW … …WHEN WE HAVE A PROBLEM ?

  52. MONITOR EVERYTHING LOGS WITH MILLIONS VS. OF OPERATIONS/DAY

  53. MONITOR EVERYTHING LOGS WITH MILLIONS VS. OF OPERATIONS/DAY

  54. MONITOR EVERYTHING WHAT HAPPENED HERE? Networking issue!

  55. MONITOR EVERYTHING Automate metrics gathering 1 Spring performance monitoring interceptor 2 Log out call stack on external calls 3 Sample internal calls 4 Automate reporting 5 Trivial cost vs. benefit 6

  56. MONITOR EVERYTHING DATA IS USELESS WITHOUT AN EASY WAY TO VIEW IT. …LETS GREP THE RED ITEMS…

  57. MONITOR EVERYTHING AUTOMATE NEXT 5 QUESTIONS/ANSWERS (Why should they be manual?)

  58. RECAP EMBRACING JAVA AND NoSQL SIMPLE IS BEST CODE A DYNAMIC SYSTEM SCALING BEST PRACTICES MONITOR EVERYTHING

  59. www.riotgames.com/careers (We’re also in the Career Pavilion at booth # CP1813) SCOTT DELAP SCALABILITY ARCHITECT sdelap@riotgames.com GDC 2012

Recommend


More recommend