SlideShare a Scribd company logo
1




                            When Devs Do Ops!

          1,000,000 daily users and just two developers
                                                      !




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




!"#$%&'##()&                               !"#$%&.#/-%+0&1#023&
'$()*+*",&)(&-."/001"                      S&()>T+*"U&."/0V0"
'()*2)%3"'$()*+-45"6&7*+-8$)"9&:28&75"     62%%+48"4+77+-"$B"E&%2>"#&)*4"2)"8T+"
;$78<=-2)>?"@+)8(-+4"A8$8&7"$B"CDEFG"      #$-7*"
H)8+-)&I$)&7"8+&E"$B"J0"                   W$8&7"8+&E"42<+"24"VD"A/X"=&>?+)*5"YX"
B-$E"/0">$()8-2+4"2)"6+-72)"               B-$)8+)*G"

*+,&-%)%-&                                 *+,&-%)%-&
D"%&E+4"$)"'&>+=$$?K"/0E"&>IL+"(4+-4"      ;$48+*"&8"'&>+=$$?"
62%%+48"+(-$:+&)"4$>2&7"%&E+"              '7&4T">72+)8"
*+L+7$:+-5"MN"#$-7*"#2*+"                  Z(=."$)"Z&274"=&>?+)*"
O)7."DP"$B"(4+-4"B-$E"&*L+-I42)%"          U.[S"F"Z+*24"]6"
J0P"$B"(4+-4"&-+"B+E&7+"A&%+"/0QR0G"


                                                                            !"#$$%&"
When Devs Do Ops
                                 !         3




!  Starting   Point!

!  Finding    Helpers!

!  Challenges    and Solutions!

!  Looking    back!




                                     !"#$$%&"
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?)!


                                                    !"#$$%&"
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!!
                                                                 !"#$$%&"
When Devs Do Ops
                                 !         6




!  Starting   Point!

!  Finding    Helpers!

!  Challenges    and Solutions!

!  Looking    back!




                                     !"#$$%&"
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!




!  New   Relic!
 !  Profiling of application at runtime!
 !  Info from HTTP request down to SQL query!

                                                !"#$$%&"
When Devs Do Ops
                                 !         8




!  Starting   Point!

!  Finding    Helpers!

!  Challenges    and Solutions!

!  Looking    back!




                                     !"#$$%&"
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

                                                                                !"#$$%&"
Solution:
                                   10

      Automate to 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!



                                                          !"#$$%&"
Challenge:
                        11

Idle servers cost money, too!




                 peak : valley ratio
                    20:1 @ VZ
                    5:1 @ FB
                                       !"#$$%&"
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!




                                                             !"#$$%&"
Solution!                  13

Run servers only when needed!




                                !"#$$%&"
Challenge  !                                14

              No application is perfect
                                      !


!  Do you know your applicationʼs behavior?!
   !  How is it used?!
   !  Whatʼs the throughput right now?!
   !  What HTTP requests stress the DB most?!




!  What did change in the last release?!
   !  How up-to-date is your information?!
   !  Can you compare performance now with last weekʼs?!




                                                           !"#$$%&"
Solution!                       15

New Relic provides trace information!




                                        !"#$$%&"
Solution
                  16

New Relic provides overviews
                           !




                               !"#$$%&"
Solution
                    17

     New Relic provides custom charts
                                    !


!  Screenshot:   Scalarium!




                                        !"#$$%&"
Challenge!                                     18

           Itʼs hard to scale out MySQL!


!  Caching requests 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!



!  So we sharded our MySQL databases!
   !  But handling 16 DBs is no fun…!
   !  … and at that time we only had 300,000 users!
                                                                !"#$$%&"
Solution!                                          19

           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)!




                                                                   !"#$$%&"
Challenge
                                           20

          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!




                                                                   !"#$$%&"
Challenge
                  21

Redis memory fragmentation!




                              !"#$$%&"
“Solution”
                                    22

         Automated setups always helps
                                     !


!  Replacing 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!



      E0V&"        40V&"               E0V="        40V="


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




                                                            !"#$$%&"
When Devs Do Ops
                                 !        23




!  Starting   Point!

!  Finding    Helpers!

!  Challenges    and Solutions!

!  Looking    back!




                                     !"#$$%&"
We still have only 2 backend
        24

 developers to operate this!




                                !"#$$%&"
Know what it means
                                     25

                    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!




                                                                     !"#$$%&"
Play to its strengths
                                   26

           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!




                                                                   !"#$$%&"
Thank you!
         !                           27




             ps.

             wooga.com/jobs
             jesper@wooga.com



                                !"#$$%&"

More Related Content

PDF
Games for the Masses: Scaling Rails to the Extreme
KEY
Blazing Data With Redis (and LEGOS!)
KEY
Profiling php applications
PDF
Cloud conference - mongodb
PDF
Chris Lea - What does NoSQL Mean for You
PDF
Hybrid my sql_hadoop_datawarehouse
PDF
MongoDB
PDF
Using Spring with NoSQL databases (SpringOne China 2012)
Games for the Masses: Scaling Rails to the Extreme
Blazing Data With Redis (and LEGOS!)
Profiling php applications
Cloud conference - mongodb
Chris Lea - What does NoSQL Mean for You
Hybrid my sql_hadoop_datawarehouse
MongoDB
Using Spring with NoSQL databases (SpringOne China 2012)

What's hot (20)

PDF
Developing polyglot persistence applications (SpringOne China 2012)
KEY
Fosdem 2009 – improving drupal's page loading performance
PDF
Polyglot and Poly-paradigm Programming for Better Agility
KEY
Introduction to MongoDB
KEY
MongoDB Case Study at NoSQL Now 2012
KEY
Dibi Conference 2012
PDF
MongoDB as a fast and queryable cache
PDF
Top 5 mistakes when writing Spark applications
PPTX
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
PDF
High-Performance Storage Services with HailDB and Java
KEY
Leveraging MongoDB: An Introductory Case Study
PPTX
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
PPTX
10 Ways to Scale with Redis - LA Redis Meetup 2019
PDF
Coldfusion comparison
PPTX
My first powershell script
PPTX
Add Redis to Postgres to Make Your Microservices Go Boom!
PDF
How MongoDB is Being Used in China - Case Studies
PDF
Newsql 2015-150213024325-conversion-gate01
PDF
Why you should be excited about ClojureScript
KEY
NOSQL, CouchDB, and the Cloud
Developing polyglot persistence applications (SpringOne China 2012)
Fosdem 2009 – improving drupal's page loading performance
Polyglot and Poly-paradigm Programming for Better Agility
Introduction to MongoDB
MongoDB Case Study at NoSQL Now 2012
Dibi Conference 2012
MongoDB as a fast and queryable cache
Top 5 mistakes when writing Spark applications
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
High-Performance Storage Services with HailDB and Java
Leveraging MongoDB: An Introductory Case Study
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
10 Ways to Scale with Redis - LA Redis Meetup 2019
Coldfusion comparison
My first powershell script
Add Redis to Postgres to Make Your Microservices Go Boom!
How MongoDB is Being Used in China - Case Studies
Newsql 2015-150213024325-conversion-gate01
Why you should be excited about ClojureScript
NOSQL, CouchDB, and the Cloud
Ad

Viewers also liked (20)

PDF
JRubyConf2013_Tim Lossen_All your core
PDF
Erlang as a Cloud Citizen
PDF
NoSQL Games_NoSQL Roadshow Berlin
PDF
Getting the Most our of your Tools_FrontEnd DevConf2013_Minsk
PDF
Designing for Scale
PDF
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
PDF
Stateful Application Server_JRubyConf13_Lukas Rieder
PDF
Metrics. Driven. Design. (Developer Conference Hamburg 2012)
PDF
How to scale a company - game teams at Wooga
PDF
Event Stream Processing with Kafka (Berlin Buzzwords 2012)
PDF
2013 04-29-evolution of backend
PDF
More than syntax
PDF
You are not alone - Scaling multiplayer games
PDF
Stateful_Application_Server_RuPy 2012_Brno
PDF
Painful success - lessons learned while scaling up
PDF
Continuous Integration for iOS (iOS User Group Berlin)
PDF
Wooga: Internationality meets Agility @Zutaten 2013
PDF
NoSQL Games
PDF
Monitoring with Syslog and EventMachine
PDF
Riak at Wooga_Riak Meetup Sept 2013
JRubyConf2013_Tim Lossen_All your core
Erlang as a Cloud Citizen
NoSQL Games_NoSQL Roadshow Berlin
Getting the Most our of your Tools_FrontEnd DevConf2013_Minsk
Designing for Scale
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
Stateful Application Server_JRubyConf13_Lukas Rieder
Metrics. Driven. Design. (Developer Conference Hamburg 2012)
How to scale a company - game teams at Wooga
Event Stream Processing with Kafka (Berlin Buzzwords 2012)
2013 04-29-evolution of backend
More than syntax
You are not alone - Scaling multiplayer games
Stateful_Application_Server_RuPy 2012_Brno
Painful success - lessons learned while scaling up
Continuous Integration for iOS (iOS User Group Berlin)
Wooga: Internationality meets Agility @Zutaten 2013
NoSQL Games
Monitoring with Syslog and EventMachine
Riak at Wooga_Riak Meetup Sept 2013
Ad

Similar to When Devs Do Ops (20)

PDF
Games for the Masses (Jax)
PDF
Scalable, good, cheap
PDF
Couche Base par Tugdual Grall
PDF
Advanced Deployment
PDF
What drives Innovation? Innovations And Technological Solutions for the Distr...
PDF
StartOps: Growing an ops team from 1 founder
PDF
Games for the Masses (QCon London 2012)
PDF
Your backend architecture is what matters slideshare
PDF
Starfish: A Self-tuning System for Big Data Analytics
PDF
Scaling Out With Hadoop And HBase
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
PDF
Scaling Social Games
KEY
Make Life Suck Less (Building Scalable Systems)
PDF
Scaling a Web Site - OSCON Tutorial
PPT
Getting Started with MongoDB at Oracle Open World 2012
PPT
Apache Con 2008 Top 10 Mistakes
PPTX
Spil Games: outgrowing an internet startup
PDF
Big Data @ Bodensee Barcamp 2010
PPT
Four Problems You Run into When DIY-ing a “Big Data” Analytics System
ODP
redis
Games for the Masses (Jax)
Scalable, good, cheap
Couche Base par Tugdual Grall
Advanced Deployment
What drives Innovation? Innovations And Technological Solutions for the Distr...
StartOps: Growing an ops team from 1 founder
Games for the Masses (QCon London 2012)
Your backend architecture is what matters slideshare
Starfish: A Self-tuning System for Big Data Analytics
Scaling Out With Hadoop And HBase
UnConference for Georgia Southern Computer Science March 31, 2015
Scaling Social Games
Make Life Suck Less (Building Scalable Systems)
Scaling a Web Site - OSCON Tutorial
Getting Started with MongoDB at Oracle Open World 2012
Apache Con 2008 Top 10 Mistakes
Spil Games: outgrowing an internet startup
Big Data @ Bodensee Barcamp 2010
Four Problems You Run into When DIY-ing a “Big Data” Analytics System
redis

More from Wooga (20)

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

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation theory and applications.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
PDF
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4
Encapsulation theory and applications.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
Empathic Computing: Creating Shared Understanding

When Devs Do Ops

  • 1. 1 When Devs Do Ops! 1,000,000 daily users and just two developers ! Jesper Richter-Reichhelm! Head of Engineering! wooga !
  • 2. About ! 2 !"#$%&'##()& !"#$%&.#/-%+0&1#023& '$()*+*",&)(&-."/001" S&()>T+*"U&."/0V0" '()*2)%3"'$()*+-45"6&7*+-8$)"9&:28&75" 62%%+48"4+77+-"$B"E&%2>"#&)*4"2)"8T+" ;$78<=-2)>?"@+)8(-+4"A8$8&7"$B"CDEFG" #$-7*" H)8+-)&I$)&7"8+&E"$B"J0" W$8&7"8+&E"42<+"24"VD"A/X"=&>?+)*5"YX" B-$E"/0">$()8-2+4"2)"6+-72)" B-$)8+)*G" *+,&-%)%-& *+,&-%)%-& D"%&E+4"$)"'&>+=$$?K"/0E"&>IL+"(4+-4" ;$48+*"&8"'&>+=$$?" 62%%+48"+(-$:+&)"4$>2&7"%&E+" '7&4T">72+)8" *+L+7$:+-5"MN"#$-7*"#2*+" Z(=."$)"Z&274"=&>?+)*" O)7."DP"$B"(4+-4"B-$E"&*L+-I42)%" U.[S"F"Z+*24"]6" J0P"$B"(4+-4"&-+"B+E&7+"A&%+"/0QR0G" !"#$$%&"
  • 3. When Devs Do Ops ! 3 !  Starting Point! !  Finding Helpers! !  Challenges and Solutions! !  Looking back! !"#$$%&"
  • 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?)! !"#$$%&"
  • 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!! !"#$$%&"
  • 6. When Devs Do Ops ! 6 !  Starting Point! !  Finding Helpers! !  Challenges and Solutions! !  Looking back! !"#$$%&"
  • 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! !  New Relic! !  Profiling of application at runtime! !  Info from HTTP request down to SQL query! !"#$$%&"
  • 8. When Devs Do Ops ! 8 !  Starting Point! !  Finding Helpers! !  Challenges and Solutions! !  Looking back! !"#$$%&"
  • 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 !"#$$%&"
  • 10. Solution:
 10 Automate to 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! !"#$$%&"
  • 11. Challenge:
 11 Idle servers cost money, too! peak : valley ratio 20:1 @ VZ 5:1 @ FB !"#$$%&"
  • 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! !"#$$%&"
  • 13. Solution! 13 Run servers only when needed! !"#$$%&"
  • 14. Challenge ! 14 No application is perfect ! !  Do you know your applicationʼs behavior?! !  How is it used?! !  Whatʼs the throughput right now?! !  What HTTP requests stress the DB most?! !  What did change in the last release?! !  How up-to-date is your information?! !  Can you compare performance now with last weekʼs?! !"#$$%&"
  • 15. Solution! 15 New Relic provides trace information! !"#$$%&"
  • 16. Solution
 16 New Relic provides overviews ! !"#$$%&"
  • 17. Solution
 17 New Relic provides custom charts ! !  Screenshot: Scalarium! !"#$$%&"
  • 18. Challenge! 18 Itʼs hard to scale out MySQL! !  Caching requests 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! !  So we sharded our MySQL databases! !  But handling 16 DBs is no fun…! !  … and at that time we only had 300,000 users! !"#$$%&"
  • 19. Solution! 19 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)! !"#$$%&"
  • 20. Challenge
 20 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! !"#$$%&"
  • 21. Challenge
 21 Redis memory fragmentation! !"#$$%&"
  • 22. “Solution”
 22 Automated setups always helps ! !  Replacing 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! E0V&" 40V&" E0V=" 40V=" !  Replacing Redis DBs! !  Same procedure as above! !  But everything can be done in 30 minutes! !"#$$%&"
  • 23. When Devs Do Ops ! 23 !  Starting Point! !  Finding Helpers! !  Challenges and Solutions! !  Looking back! !"#$$%&"
  • 24. We still have only 2 backend
 24 developers to operate this! !"#$$%&"
  • 25. Know what it means
 25 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! !"#$$%&"
  • 26. Play to its strengths
 26 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! !"#$$%&"
  • 27. Thank you! ! 27 ps. wooga.com/jobs jesper@wooga.com !"#$$%&"