SlideShare a Scribd company logo
1 of 26
Download to read offline
1




              Monster World at Amazon EC2!

   Hosting a social game with one million daily active users
                                                           !




Jesper Richter-Reichhelm!
Head of Engineering!
wooga !
About
                                                                  !                                                                 2




About	
  wooga	
                                                  About	
  Monster	
  World	
  
Founded	
  January	
  2009	
                                      Launched	
  May	
  2010	
  
Funding:	
  Founders,	
  Balderton	
  Capital,	
                  Biggest	
  seller	
  of	
  magic	
  wands	
  in	
  the	
  
Holtzbrinck	
  Ventures	
  (total	
  of	
  €5m+)	
                world	
  
InternaIonal	
  team	
  of	
  60	
                                Total	
  team	
  size	
  is	
  15	
  (2x	
  backend,	
  3x	
  
from	
  15	
  countries	
  in	
  Berlin	
                         frontend)	
  

Key	
  stats	
                                                    Key	
  stats	
  
4	
  games	
  on	
  Facebook;	
  16m	
  acIve	
  users	
          Hosted	
  at	
  Facebook	
  
Biggest	
  european	
  social	
  game	
                           Flash	
  client	
  
developer	
                                                       Ruby	
  on	
  Rails	
  backend	
  
Only	
  5%	
  of	
  users	
  from	
  adverIsing	
                 MySQL	
  +	
  Redis	
  DB	
  
70%	
  of	
  users	
  are	
  female	
  (age	
  20-­‐60)	
  


                                                                                                                         ©	
  wooga	
  
Monster World at Amazon EC2!              3




  Starting   Point!

  Finding    Helpers!

  Challenges    and Solutions!

  Looking    back!




                                       ©	
  wooga	
  
Starting Point
                                !                              4




  InOctober 2009 we set out to build a backend
  for woogaʼs first game with a persistent world.!


  Our goal was to have more than 1,000,000 daily
  active users.!


  Wehave never done something like this before
  (who had?)!


                                                    ©	
  wooga	
  
Hosting model must fit the needs
                                           !                                5




  Small team dedicated to a single game!
     2 backend folks to do both development and operation!


  “Extreme”                 life cycle of a game!
 !(graphic by Rightscale)!




  We       simply did not know what to expect!
      Scale up hosting when you are successful – not before!!
                                                                 ©	
  wooga	
  
Monster World at Amazon EC2!              6




  Starting   Point!

  Finding    Helpers!

  Challenges    and Solutions!

  Looking    back!




                                      ©	
  wooga	
  
Focus on what you do best…  !                      7

          and get help for the rest
                                  !


  Amazon   Web Services!
   Easy to scale up and down!
   No limitations!




  Scalarium!
   Making operation of a large cluster easy!
   Provides default setup!
   Provides consultancy if needed!
   Based in Berlin => better communication!




                                                ©	
  wooga	
  
Monster World at Amazon EC2!              8




  Starting   Point!

  Finding    Helpers!

  Challenges    and Solutions!

  Looking    back!




                                      ©	
  wooga	
  
Challenge:
                                          9

                                     Growing traffic
                                                  !
1,200,000




1,000,000




 800,000




 600,000




 400,000




 200,000




       0
       4/22/14   5/22/14   6/22/14    7/22/14   8/22/14   9/22/14   10/22/14   11/22/14

                                                                                ©	
  wooga	
  
Solution:
                                 10

                  Scale up and out easily
                                        !


  Scaling up!
     Application servers: 2 cores => 8 cores!
     DB servers: 7.5GB => 68GB!




  Scaling out!
     Application servers: 2 => up to 50!
     MySQL servers: 2 => 16 => 8!




  Easy installation by automation!
     Chef recipes managed by Scalarium make that easy!



                                                          ©	
  wooga	
  
Challenge:
                            11

Idle servers cost money, too!




                 peak : valley ratio
                    20:1 @ VZ
                    5:1 @ FB
                                       ©	
  wooga	
  
Solution!                                            12

       Run servers only when needed!


  Scalarium offers time and load based         instances!
     Start and stop instances based on time!
     Start and stop instances based on load!




                                                             ©	
  wooga	
  
Solution!                      13

Run servers only when needed!




                                ©	
  wooga	
  
Challenge!                                         14

           Itʼs hard to scale out MySQL!


  Standard recipes would not work!
     Almost all HTTP requests were changing something in DB!



  We optimized our MySQL configuration!
     Perconaʼs XtraDB, innodb_flush_method = O_DIRECT!
     Patches to ActiveRecord and data_fabric gem!



  Still I/O performance of EBS was a hard limit!
     Maximum of 1,000 write transactions / sec / server!
     But already 5,000 writes / sec at peak for 8 masters!



  We sharded our MySQL databases!
     But handling 16 DBs is no fun…!
     … and at that time we only had 300,000 users!
                                                                ©	
  wooga	
  
Solution!                                              15

           Pick a DB thatʼs better suited!


  Redis was our choice!
     Master runs in-memory only (45,000 writes / sec / server)!
     Slaves backup data to disk every 15 minutes!
     Rich data model that is way beyond simple key/value!




  We migrated most write heavy tables to Redis!
     Currently Redis has 2.5x transactions / sec than MySQL!
     But MySQL has still more data (256 GB vs. 40 GB)!




                                                                   ©	
  wooga	
  
Challenge
                                               16

          Handling Data (Bases) is hard!


  MySQL has its problems!
     Making a backup of 64GB takes about 30 minutes…!
     But restoring it can take 6 hours or more!




  Redis is not perfect, too!
     Memory consumption of process grows over time!
     If too much memory is used backup to disk no longer works!
     Every two weeks we had to replace servers to “reset” RAM!




                                                                   ©	
  wooga	
  
Challenge
                      17

Redis memory fragmentation!




                              ©	
  wooga	
  
Solution (not really)
                                     18

     Having temporary servers helps a bit
                                        !


  Scaling up MySQL DBs!
     Start up new master / slave and restore backup!
     Make master slave of existing slave!
     Wait until replication in sync again (some hours)!
     Switch to new master and remove old master / slave!



      m01a	
       s01a	
              m01b	
       s01b	
  


  Replacing Redis DBs!
     Same procedure as above!
     But everything can be done in 30 minutes!




                                                               ©	
  wooga	
  
Solution (hopefully)
                                            19

      Have an elastic persistence storage!


  Currently investigating “elastic” alternative!
     Riak, MemBase, Hbase, Cassandra etc.!
     Can they provide a similar latency as MySQL?!




  A cloud helps with setting up test clusters!
     Different test clusters (node count, EBS RAID levels etc.)!
     Easy manual cluster setup!
     Automated test runs!




                                                                    ©	
  wooga	
  
Monster World at Amazon EC2!            20




  Starting   Point!

  Finding    Helpers!

  Challenges    and Solutions!

  Looking    back!




                                      ©	
  wooga	
  
Monster World now has more
                 21

      than 1,100,000 daily active users
                                      !


  Screenshot:   Scalarium!




                                          ©	
  wooga	
  
We still have only 2 backend
            22

 developers to operate this!




                                ©	
  wooga	
  
We still have only 2 backend
            23

 developers to operate this!




                                ©	
  wooga	
  
Know what it means
                                         24

                    to be in a Cloud
                                   !


  Using a cloud has some disadvantages!
     Another game with dedicated HW has 8x better performance!
     I/O and network performance of EC2 is quite … err … limited!
     You cannot pick the best hardware possible!
     All hosts have the same chance of failure!




  But offers unique advantages!
     Having unlimited servers on demand is just awesome!!
     You pay only for what you need when you need it!
     You can concentrate on your product!
     Itʼs very easy to experiment!




                                                                     ©	
  wooga	
  
Play to its strengths
                                       25

           and adjust for its weaknesses
                                       !


  Play to its strengths!
     Program your infrastructure, automate as much as possible!
     Measure closely and react to changes!
     Scaling up and out is quite easy!
     Sit back and relax…!




  And adjust for its weaknesses!
     Avoid I/O – consider an in memory database or caching!
     Be prepared that every host can fail!




                                                                   ©	
  wooga	
  
Thank you!
         !                               26




             ps.

             wooga.com/jobs
             jesper@wooga.com



                                ©	
  wooga	
  

More Related Content

Viewers also liked

Games for the Masses: Scaling Rails to the Extreme
Games for the Masses: Scaling Rails to the ExtremeGames for the Masses: Scaling Rails to the Extreme
Games for the Masses: Scaling Rails to the ExtremeWooga
 
Metrics. Driven. Design. (Developer Conference Hamburg 2012)
Metrics. Driven. Design. (Developer Conference Hamburg 2012)Metrics. Driven. Design. (Developer Conference Hamburg 2012)
Metrics. Driven. Design. (Developer Conference Hamburg 2012)Wooga
 
How to scale a company - game teams at Wooga
How to scale a company - game teams at WoogaHow to scale a company - game teams at Wooga
How to scale a company - game teams at WoogaWooga
 
Event Stream Processing with Kafka (Berlin Buzzwords 2012)
Event Stream Processing with Kafka (Berlin Buzzwords 2012)Event Stream Processing with Kafka (Berlin Buzzwords 2012)
Event Stream Processing with Kafka (Berlin Buzzwords 2012)Wooga
 
2013 04-29-evolution of backend
2013 04-29-evolution of backend2013 04-29-evolution of backend
2013 04-29-evolution of backendWooga
 
More than syntax
More than syntaxMore than syntax
More than syntaxWooga
 
You are not alone - Scaling multiplayer games
You are not alone - Scaling multiplayer gamesYou are not alone - Scaling multiplayer games
You are not alone - Scaling multiplayer gamesWooga
 
Stateful_Application_Server_RuPy 2012_Brno
Stateful_Application_Server_RuPy 2012_BrnoStateful_Application_Server_RuPy 2012_Brno
Stateful_Application_Server_RuPy 2012_BrnoWooga
 
Painful success - lessons learned while scaling up
Painful success - lessons learned while scaling upPainful success - lessons learned while scaling up
Painful success - lessons learned while scaling upWooga
 
Continuous Integration for iOS (iOS User Group Berlin)
Continuous Integration for iOS (iOS User Group Berlin)Continuous Integration for iOS (iOS User Group Berlin)
Continuous Integration for iOS (iOS User Group Berlin)Wooga
 
NoSQL Games
NoSQL GamesNoSQL Games
NoSQL GamesWooga
 
Wooga: Internationality meets Agility @Zutaten 2013
Wooga: Internationality meets Agility @Zutaten 2013Wooga: Internationality meets Agility @Zutaten 2013
Wooga: Internationality meets Agility @Zutaten 2013Wooga
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineWooga
 
"Common Sense" instead of "Command and Control"_Start up Camp 2013
"Common Sense" instead of "Command and Control"_Start up Camp 2013"Common Sense" instead of "Command and Control"_Start up Camp 2013
"Common Sense" instead of "Command and Control"_Start up Camp 2013Wooga
 
Riak at Wooga_Riak Meetup Sept 2013
Riak at Wooga_Riak Meetup Sept 2013Riak at Wooga_Riak Meetup Sept 2013
Riak at Wooga_Riak Meetup Sept 2013Wooga
 
Erlang, the big switch in social games
Erlang, the big switch in social gamesErlang, the big switch in social games
Erlang, the big switch in social gamesWooga
 
WebConf_Riga_Confessions of-a-traitor_Krzsysztof Szafranek
WebConf_Riga_Confessions of-a-traitor_Krzsysztof SzafranekWebConf_Riga_Confessions of-a-traitor_Krzsysztof Szafranek
WebConf_Riga_Confessions of-a-traitor_Krzsysztof SzafranekWooga
 

Viewers also liked (17)

Games for the Masses: Scaling Rails to the Extreme
Games for the Masses: Scaling Rails to the ExtremeGames for the Masses: Scaling Rails to the Extreme
Games for the Masses: Scaling Rails to the Extreme
 
Metrics. Driven. Design. (Developer Conference Hamburg 2012)
Metrics. Driven. Design. (Developer Conference Hamburg 2012)Metrics. Driven. Design. (Developer Conference Hamburg 2012)
Metrics. Driven. Design. (Developer Conference Hamburg 2012)
 
How to scale a company - game teams at Wooga
How to scale a company - game teams at WoogaHow to scale a company - game teams at Wooga
How to scale a company - game teams at Wooga
 
Event Stream Processing with Kafka (Berlin Buzzwords 2012)
Event Stream Processing with Kafka (Berlin Buzzwords 2012)Event Stream Processing with Kafka (Berlin Buzzwords 2012)
Event Stream Processing with Kafka (Berlin Buzzwords 2012)
 
2013 04-29-evolution of backend
2013 04-29-evolution of backend2013 04-29-evolution of backend
2013 04-29-evolution of backend
 
More than syntax
More than syntaxMore than syntax
More than syntax
 
You are not alone - Scaling multiplayer games
You are not alone - Scaling multiplayer gamesYou are not alone - Scaling multiplayer games
You are not alone - Scaling multiplayer games
 
Stateful_Application_Server_RuPy 2012_Brno
Stateful_Application_Server_RuPy 2012_BrnoStateful_Application_Server_RuPy 2012_Brno
Stateful_Application_Server_RuPy 2012_Brno
 
Painful success - lessons learned while scaling up
Painful success - lessons learned while scaling upPainful success - lessons learned while scaling up
Painful success - lessons learned while scaling up
 
Continuous Integration for iOS (iOS User Group Berlin)
Continuous Integration for iOS (iOS User Group Berlin)Continuous Integration for iOS (iOS User Group Berlin)
Continuous Integration for iOS (iOS User Group Berlin)
 
NoSQL Games
NoSQL GamesNoSQL Games
NoSQL Games
 
Wooga: Internationality meets Agility @Zutaten 2013
Wooga: Internationality meets Agility @Zutaten 2013Wooga: Internationality meets Agility @Zutaten 2013
Wooga: Internationality meets Agility @Zutaten 2013
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachine
 
"Common Sense" instead of "Command and Control"_Start up Camp 2013
"Common Sense" instead of "Command and Control"_Start up Camp 2013"Common Sense" instead of "Command and Control"_Start up Camp 2013
"Common Sense" instead of "Command and Control"_Start up Camp 2013
 
Riak at Wooga_Riak Meetup Sept 2013
Riak at Wooga_Riak Meetup Sept 2013Riak at Wooga_Riak Meetup Sept 2013
Riak at Wooga_Riak Meetup Sept 2013
 
Erlang, the big switch in social games
Erlang, the big switch in social gamesErlang, the big switch in social games
Erlang, the big switch in social games
 
WebConf_Riga_Confessions of-a-traitor_Krzsysztof Szafranek
WebConf_Riga_Confessions of-a-traitor_Krzsysztof SzafranekWebConf_Riga_Confessions of-a-traitor_Krzsysztof Szafranek
WebConf_Riga_Confessions of-a-traitor_Krzsysztof Szafranek
 

More from Wooga

Story of Warlords: Bringing a turn-based strategy game to mobile
Story of Warlords: Bringing a turn-based strategy game to mobile Story of Warlords: Bringing a turn-based strategy game to mobile
Story of Warlords: Bringing a turn-based strategy game to mobile Wooga
 
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015Wooga
 
In it for the long haul - How Wooga boosts long-term retention
In it for the long haul - How Wooga boosts long-term retentionIn it for the long haul - How Wooga boosts long-term retention
In it for the long haul - How Wooga boosts long-term retentionWooga
 
Leveling up in localization! - Susan Alma & Dario Quondamstefano
Leveling up in localization! - Susan Alma & Dario QuondamstefanoLeveling up in localization! - Susan Alma & Dario Quondamstefano
Leveling up in localization! - Susan Alma & Dario QuondamstefanoWooga
 
Evoloution of Ideas
Evoloution of IdeasEvoloution of Ideas
Evoloution of IdeasWooga
 
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Wooga
 
Saying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
Saying No to the CEO: A Deep Look at Independent Teams - Adam TelferSaying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
Saying No to the CEO: A Deep Look at Independent Teams - Adam TelferWooga
 
Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Wooga
 
Big Fish, small pond - strategies for surviving in a maturing market - Ed Biden
Big Fish, small pond - strategies for surviving in a maturing market - Ed BidenBig Fish, small pond - strategies for surviving in a maturing market - Ed Biden
Big Fish, small pond - strategies for surviving in a maturing market - Ed BidenWooga
 
Review mining aps2014 berlin
Review mining aps2014 berlinReview mining aps2014 berlin
Review mining aps2014 berlinWooga
 
Riak & Wooga_Geeek2Geeek Meetup2014 Berlin
Riak & Wooga_Geeek2Geeek Meetup2014 BerlinRiak & Wooga_Geeek2Geeek Meetup2014 Berlin
Riak & Wooga_Geeek2Geeek Meetup2014 BerlinWooga
 
Staying in the Game: Game localization practices for the mobile market
Staying in the Game: Game localization practices for the mobile marketStaying in the Game: Game localization practices for the mobile market
Staying in the Game: Game localization practices for the mobile marketWooga
 
Startup Weekend_Makers and Games_Philipp Stelzer
Startup Weekend_Makers and Games_Philipp StelzerStartup Weekend_Makers and Games_Philipp Stelzer
Startup Weekend_Makers and Games_Philipp StelzerWooga
 
DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)Wooga
 
DevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
DevOps goes Mobile - Jax 2014 - Jesper Richter-ReichhelmDevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
DevOps goes Mobile - Jax 2014 - Jesper Richter-ReichhelmWooga
 
CodeFest 2014_Mobile Game Development
CodeFest 2014_Mobile Game DevelopmentCodeFest 2014_Mobile Game Development
CodeFest 2014_Mobile Game DevelopmentWooga
 
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014Wooga
 
How to hire the best people for your startup-Gitta Blat-Head of People
How to hire the best people for your startup-Gitta Blat-Head of PeopleHow to hire the best people for your startup-Gitta Blat-Head of People
How to hire the best people for your startup-Gitta Blat-Head of PeopleWooga
 
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014Wooga
 
Pocket Gamer Connects 2014_The Experience of Entering the Korean Market
Pocket Gamer Connects 2014_The Experience of Entering the Korean MarketPocket Gamer Connects 2014_The Experience of Entering the Korean Market
Pocket Gamer Connects 2014_The Experience of Entering the Korean MarketWooga
 

More from Wooga (20)

Story of Warlords: Bringing a turn-based strategy game to mobile
Story of Warlords: Bringing a turn-based strategy game to mobile Story of Warlords: Bringing a turn-based strategy game to mobile
Story of Warlords: Bringing a turn-based strategy game to mobile
 
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
Instagram Celebrities: are they the new cats? - Targetsummit Berlin 2015
 
In it for the long haul - How Wooga boosts long-term retention
In it for the long haul - How Wooga boosts long-term retentionIn it for the long haul - How Wooga boosts long-term retention
In it for the long haul - How Wooga boosts long-term retention
 
Leveling up in localization! - Susan Alma & Dario Quondamstefano
Leveling up in localization! - Susan Alma & Dario QuondamstefanoLeveling up in localization! - Susan Alma & Dario Quondamstefano
Leveling up in localization! - Susan Alma & Dario Quondamstefano
 
Evoloution of Ideas
Evoloution of IdeasEvoloution of Ideas
Evoloution of Ideas
 
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
Entitas System Architecture with Unity - Maxim Zaks and Simon Schmid
 
Saying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
Saying No to the CEO: A Deep Look at Independent Teams - Adam TelferSaying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
Saying No to the CEO: A Deep Look at Independent Teams - Adam Telfer
 
Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)
 
Big Fish, small pond - strategies for surviving in a maturing market - Ed Biden
Big Fish, small pond - strategies for surviving in a maturing market - Ed BidenBig Fish, small pond - strategies for surviving in a maturing market - Ed Biden
Big Fish, small pond - strategies for surviving in a maturing market - Ed Biden
 
Review mining aps2014 berlin
Review mining aps2014 berlinReview mining aps2014 berlin
Review mining aps2014 berlin
 
Riak & Wooga_Geeek2Geeek Meetup2014 Berlin
Riak & Wooga_Geeek2Geeek Meetup2014 BerlinRiak & Wooga_Geeek2Geeek Meetup2014 Berlin
Riak & Wooga_Geeek2Geeek Meetup2014 Berlin
 
Staying in the Game: Game localization practices for the mobile market
Staying in the Game: Game localization practices for the mobile marketStaying in the Game: Game localization practices for the mobile market
Staying in the Game: Game localization practices for the mobile market
 
Startup Weekend_Makers and Games_Philipp Stelzer
Startup Weekend_Makers and Games_Philipp StelzerStartup Weekend_Makers and Games_Philipp Stelzer
Startup Weekend_Makers and Games_Philipp Stelzer
 
DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)DevOps goes Mobile (daho.am)
DevOps goes Mobile (daho.am)
 
DevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
DevOps goes Mobile - Jax 2014 - Jesper Richter-ReichhelmDevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
DevOps goes Mobile - Jax 2014 - Jesper Richter-Reichhelm
 
CodeFest 2014_Mobile Game Development
CodeFest 2014_Mobile Game DevelopmentCodeFest 2014_Mobile Game Development
CodeFest 2014_Mobile Game Development
 
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
Jelly Splash: Puzzling your way to the top of the App Stores - GDC 2014
 
How to hire the best people for your startup-Gitta Blat-Head of People
How to hire the best people for your startup-Gitta Blat-Head of PeopleHow to hire the best people for your startup-Gitta Blat-Head of People
How to hire the best people for your startup-Gitta Blat-Head of People
 
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
Two Ann(e)s and one Julia_Wooga Lady Power from Berlin_SGA2014
 
Pocket Gamer Connects 2014_The Experience of Entering the Korean Market
Pocket Gamer Connects 2014_The Experience of Entering the Korean MarketPocket Gamer Connects 2014_The Experience of Entering the Korean Market
Pocket Gamer Connects 2014_The Experience of Entering the Korean Market
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Monster World at Amazon EC2

  • 1. 1 Monster World at Amazon EC2! Hosting a social game with one million daily active users ! Jesper Richter-Reichhelm! Head of Engineering! wooga !
  • 2. About ! 2 About  wooga   About  Monster  World   Founded  January  2009   Launched  May  2010   Funding:  Founders,  Balderton  Capital,   Biggest  seller  of  magic  wands  in  the   Holtzbrinck  Ventures  (total  of  €5m+)   world   InternaIonal  team  of  60   Total  team  size  is  15  (2x  backend,  3x   from  15  countries  in  Berlin   frontend)   Key  stats   Key  stats   4  games  on  Facebook;  16m  acIve  users   Hosted  at  Facebook   Biggest  european  social  game   Flash  client   developer   Ruby  on  Rails  backend   Only  5%  of  users  from  adverIsing   MySQL  +  Redis  DB   70%  of  users  are  female  (age  20-­‐60)   ©  wooga  
  • 3. Monster World at Amazon EC2! 3   Starting Point!   Finding Helpers!   Challenges and Solutions!   Looking back! ©  wooga  
  • 4. Starting Point ! 4   InOctober 2009 we set out to build a backend for woogaʼs first game with a persistent world.!   Our goal was to have more than 1,000,000 daily active users.!   Wehave never done something like this before (who had?)! ©  wooga  
  • 5. Hosting model must fit the needs ! 5   Small team dedicated to a single game!   2 backend folks to do both development and operation!   “Extreme” life cycle of a game! !(graphic by Rightscale)!   We simply did not know what to expect!   Scale up hosting when you are successful – not before!! ©  wooga  
  • 6. Monster World at Amazon EC2! 6   Starting Point!   Finding Helpers!   Challenges and Solutions!   Looking back! ©  wooga  
  • 7. Focus on what you do best… ! 7 and get help for the rest !   Amazon Web Services!   Easy to scale up and down!   No limitations!   Scalarium!   Making operation of a large cluster easy!   Provides default setup!   Provides consultancy if needed!   Based in Berlin => better communication! ©  wooga  
  • 8. Monster World at Amazon EC2! 8   Starting Point!   Finding Helpers!   Challenges and Solutions!   Looking back! ©  wooga  
  • 9. Challenge:
 9 Growing traffic ! 1,200,000 1,000,000 800,000 600,000 400,000 200,000 0 4/22/14 5/22/14 6/22/14 7/22/14 8/22/14 9/22/14 10/22/14 11/22/14 ©  wooga  
  • 10. Solution:
 10 Scale up and out easily !   Scaling up!   Application servers: 2 cores => 8 cores!   DB servers: 7.5GB => 68GB!   Scaling out!   Application servers: 2 => up to 50!   MySQL servers: 2 => 16 => 8!   Easy installation by automation!   Chef recipes managed by Scalarium make that easy! ©  wooga  
  • 11. Challenge:
 11 Idle servers cost money, too! peak : valley ratio 20:1 @ VZ 5:1 @ FB ©  wooga  
  • 12. Solution! 12 Run servers only when needed!   Scalarium offers time and load based instances!   Start and stop instances based on time!   Start and stop instances based on load! ©  wooga  
  • 13. Solution! 13 Run servers only when needed! ©  wooga  
  • 14. Challenge! 14 Itʼs hard to scale out MySQL!   Standard recipes would not work!   Almost all HTTP requests were changing something in DB!   We optimized our MySQL configuration!   Perconaʼs XtraDB, innodb_flush_method = O_DIRECT!   Patches to ActiveRecord and data_fabric gem!   Still I/O performance of EBS was a hard limit!   Maximum of 1,000 write transactions / sec / server!   But already 5,000 writes / sec at peak for 8 masters!   We sharded our MySQL databases!   But handling 16 DBs is no fun…!   … and at that time we only had 300,000 users! ©  wooga  
  • 15. Solution! 15 Pick a DB thatʼs better suited!   Redis was our choice!   Master runs in-memory only (45,000 writes / sec / server)!   Slaves backup data to disk every 15 minutes!   Rich data model that is way beyond simple key/value!   We migrated most write heavy tables to Redis!   Currently Redis has 2.5x transactions / sec than MySQL!   But MySQL has still more data (256 GB vs. 40 GB)! ©  wooga  
  • 16. Challenge
 16 Handling Data (Bases) is hard!   MySQL has its problems!   Making a backup of 64GB takes about 30 minutes…!   But restoring it can take 6 hours or more!   Redis is not perfect, too!   Memory consumption of process grows over time!   If too much memory is used backup to disk no longer works!   Every two weeks we had to replace servers to “reset” RAM! ©  wooga  
  • 17. Challenge
 17 Redis memory fragmentation! ©  wooga  
  • 18. Solution (not really)
 18 Having temporary servers helps a bit !   Scaling up MySQL DBs!   Start up new master / slave and restore backup!   Make master slave of existing slave!   Wait until replication in sync again (some hours)!   Switch to new master and remove old master / slave! m01a   s01a   m01b   s01b     Replacing Redis DBs!   Same procedure as above!   But everything can be done in 30 minutes! ©  wooga  
  • 19. Solution (hopefully)
 19 Have an elastic persistence storage!   Currently investigating “elastic” alternative!   Riak, MemBase, Hbase, Cassandra etc.!   Can they provide a similar latency as MySQL?!   A cloud helps with setting up test clusters!   Different test clusters (node count, EBS RAID levels etc.)!   Easy manual cluster setup!   Automated test runs! ©  wooga  
  • 20. Monster World at Amazon EC2! 20   Starting Point!   Finding Helpers!   Challenges and Solutions!   Looking back! ©  wooga  
  • 21. Monster World now has more
 21 than 1,100,000 daily active users !   Screenshot: Scalarium! ©  wooga  
  • 22. We still have only 2 backend
 22 developers to operate this! ©  wooga  
  • 23. We still have only 2 backend
 23 developers to operate this! ©  wooga  
  • 24. Know what it means
 24 to be in a Cloud !   Using a cloud has some disadvantages!   Another game with dedicated HW has 8x better performance!   I/O and network performance of EC2 is quite … err … limited!   You cannot pick the best hardware possible!   All hosts have the same chance of failure!   But offers unique advantages!   Having unlimited servers on demand is just awesome!!   You pay only for what you need when you need it!   You can concentrate on your product!   Itʼs very easy to experiment! ©  wooga  
  • 25. Play to its strengths
 25 and adjust for its weaknesses !   Play to its strengths!   Program your infrastructure, automate as much as possible!   Measure closely and react to changes!   Scaling up and out is quite easy!   Sit back and relax…!   And adjust for its weaknesses!   Avoid I/O – consider an in memory database or caching!   Be prepared that every host can fail! ©  wooga  
  • 26. Thank you! ! 26 ps. wooga.com/jobs jesper@wooga.com ©  wooga