SlideShare une entreprise Scribd logo
1  sur  78
ARCHITECTURE  EVOLUTION
       AT  WOOGA
               How  does  your  company  learn  new  things?




Jesper  Richter-­‐Reichhelm,  @jrirei
Our  games  all  look  the  same

       Flash  client               Backend
But  the  scale  is  interesFng


             14  billion  requests  /  month
But  the  scale  is  interesFng


             14  billion  requests  /  month
But  the  scale  is  interesFng


             14  billion  requests  /  month



          >100,000  DB  operaFons  /  second
But  the  scale  is  interesFng


             14  billion  requests  /  month



          >100,000  DB  operaFons  /  second



            >50,000  DB  updates  /  second
Architecture  EvoluFon  at  Wooga

  The  Start

  The  Next  Step

  Best  of  Two  Worlds
Oct  2009:  Monster  World  based  on  Ruby

 Good  code  quality
   Easy  to  understand
   Easy  to  test
   Easy  to  refactor
Oct  2009:  Monster  World  based  on  Ruby

 Good  code  quality
   Easy  to  understand
   Easy  to  test
   Easy  to  refactor
Oct  2009:  Monster  World  based  on  Ruby

 Good  code  quality
   Easy  to  understand
   Easy  to  test
   Easy  to  refactor
A  basic  setup  using  sharding  worked  fine

                            lb




                    app     app    app




                     My           My
                     SQL          SQL


                    slave         slave
A  basic  setup  using  sharding  worked  fine

                              lb




                app   app     app    app    app




                      My            My
                      SQL           SQL


                      slave         slave
A  basic  setup  using  sharding  worked  fine

                                  lb




        app   app   app   app     app    app    app   app   app




                          My            My
                          SQL           SQL


                          slave         slave
250K  daily  users
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"
                            Life  was  good

        !"
        '()*%!"   +,-*%!"       ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
250K  daily  users
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"
                            Life  was  good NO  MORE

        !"
        '()*%!"   +,-*%!"       ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
Early  sharding  hell:  8  master  and  8  slaves

                                   lb




         app   app   app   app     app   app     app   app   app


         app   app   app   app     app   app     app   app   app




                           My            My
                           SQL           SQL


                           slave         slave
Early  sharding  hell:  8  master  and  8  slaves

                                     lb




         app   app     app   app     app   app     app      app   app


         app   app     app   app     app   app     app      app   app




                     My      My            My       My
                     SQL     SQL           SQL      SQL


                     slave   slave         slave    slave
Early  sharding  hell:  8  master  and  8  slaves

                                               lb




             app         app     app   app     app   app     app      app         app


             app     app         app   app     app   app     app      app         app




      My           My          My      My            My       My            My          My
      SQL          SQL         SQL     SQL           SQL      SQL           SQL         SQL


     slave     slave           slave   slave         slave    slave     slave           slave
At  500K  daily  users  we  were  at  a  dead  end
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"




        !"
        '()*%!"   +,-*%!"   ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
OUCH!



http://www.flickr.com/photos/billue_the_bear/
Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis




          MySQL
Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis




          MySQL                        Redis
Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis




          MySQL                        Redis
       256  GB  data
        10%  writes
Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis




          MySQL                        Redis
       256  GB  data                60  GB  data
        10%  writes                 50%  writes
Redis  saved  the  day
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"




        !"
        '()*%!"   +,-*%!"   ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
Redis  saved  the  day
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"




        !"
        '()*%!"   +,-*%!"   ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
We  now  have  more  than  2  million  users  /  day
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"




 #!!$!!!"




        !"
        '()*%!"   +,-*%!"   ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
We  now  have  more  than  2  million  users  /  day
&$!!!$!!!"




%$#!!$!!!"




%$!!!$!!!"


                                         AWS  service
 #!!$!!!"                                 disrupFon
                                          in  Ireland

        !"
        '()*%!"   +,-*%!"   ./0*%!"   +12*%%"   '()*%%"   +,-*%%"   ./0*%%"
10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all!

                                        lb         lb


app   app   app   app     app   app          app        app     app      app   app   app   app


app   app   app   app     app   app          app        app     app      app   app   app   app


app   app   app   app     app   app          app        app     app      app   app   app   app


                        My      My
                                                        redis    redis
                        SQL     SQL


                        slave   slave                   slave    slave
10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all!

                                               lb         lb


app     app      app     app     app   app          app        app     app      app   app   app   app


app     app      app     app     app   app          app        app     app      app   app   app   app


app     app      app     app     app   app          app        app     app      app   app   app   app


My       My            My      My      My
                                                               redis    redis
SQL      SQL           SQL     SQL     SQL


slave    slave     slave       slave   slave                   slave    slave
10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all!

                                               lb         lb


app     app      app     app     app   app          app        app     app      app   app     app   app


app     app      app     app     app   app          app        app     app      app   app     app   app


app     app      app     app     app   app          app        app     app      app   app     app   app


My       My            My      My      My
                                                               redis    redis     redis     redis   redis
SQL      SQL           SQL     SQL     SQL


slave    slave     slave       slave   slave                   slave    slave     slave     slave   slave
http://www.flickr.com/photos/wolfsavard/




OUCH!
Architecture  EvoluFon  at  Wooga

  The  Start:  Ruby  +  AutomaFon

  The  Next  Step

  Best  of  Two  Worlds
Stateless  servers  and  DBs

         Server                Database
Stateless  servers  and  DBs

         Server                Database
Stateless  servers  and  DBs

         Server                Database
Stateless  servers  and  DBs

         Server                Database
Stateless  servers  and  DBs

         Server                Database
Stateless  servers  and  DBs

         Server                Database
“Stateless  applica,on  servers  
     guarantee  one  thing:
“Stateless  applica,on  servers  
     guarantee  one  thing:
      The  data  is  never
     where  you  need  it!”
    Paolo  Negri,  Developer  @  Wooga
Stateful  servers  and  DBs

          Server              Database
Stateful  servers  and  DBs

          Server              Database
Stateful  servers  and  DBs

          Server              Database
Stateful  servers  and  DBs

          Server                        Database




                   One  Game  Session
Stateful  servers  and  DBs

          Server                        Database




                   One  Game  Session
Oct  2010:  Magic  Land  based  on  stateful  server

 If  DBs  are  the  problem
      Don’t  use  them
      Store  state  in  server
      Need  to  be  robust
Oct  2010:  Magic  Land  based  on  stateful  server

 If  DBs  are  the  problem
      Don’t  use  them
      Store  state  in  server
      Need  to  be  robust
Oct  2010:  Magic  Land  based  on  stateful  server

 If  DBs  are  the  problem
      Don’t  use  them
      Store  state  in  server
      Need  to  be  robust
Stateful  servers  are  not  as  hard  as  you  think




                        session
Stateful  servers  are  not  as  hard  as  you  think




                              session
                            session
                          session
                        session
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



                           Server


                              session
                            session
                          session
                        session




                             S3
Stateful  servers  are  not  as  hard  as  you  think



         Server            Server             Server


            session
          session             session
                            session              session
                                               session
        session
      session             session
                        session              session
                                           session




                             S3
With  stateful  server  the  DB  is  less  used

             Ruby  Stateless            Erlang  Stateful

  30,000
  22,500
  15,000
   7,500
      0
                  database  operations  /  sec
With  stateful  server  the  DB  is  less  used

             Ruby  Stateless            Erlang  Stateful

  30,000
  22,500
  15,000
                                           700
   7,500
      0
                  database  operations  /  sec
Deploying  with  a  stateful  server

 In  order  to  bring  up  a  new  version
Deploying  with  a  stateful  server

 In  order  to  bring  up  a  new  version

 Just  deploy  it
    Hot  code  replacement  is  great!
There  are  even  more  advantages

 Faster  than  Ruby  (5,000  rps  /  node)
     -­‐ CPU  bound
There  are  even  more  advantages

 Faster  than  Ruby  (5,000  rps  /  node)
     -­‐ CPU  bound

 Very  few  SPOFs
     -­‐ ...  and  those  are  easy  to  recover
There  are  even  more  advantages

 Faster  than  Ruby  (5,000  rps  /  node)
     -­‐ CPU  bound

 Very  few  SPOFs
     -­‐ ...  and  those  are  easy  to  recover

 TransacFonal  logic
     -­‐ Invariants  instead  of  explicit  error  handling
NICE!
        http://www.flickr.com/photos/aigle_dore/
Architecture  EvoluFon  at  Wooga

  The  Start:  Ruby  +  AutomaFon

  The  Next  Step:  Erlang  +  S3

  Company  Values
A  good  value  system

 We’ve  learned  to  value
A  good  value  system

 We’ve  learned  to  value
 Small  teams                              over     Big  teams
A  good  value  system

 We’ve  learned  to  value
     
 Small  teams                              over     Big  teams
 CollaboraFon                        over           Compe??on
A  good  value  system

 We’ve  learned  to  value
     
 Small  teams                              over     Big  teams
 CollaboraFon                        over           Compe??on
 Generalists                                over    Specialists
A  good  value  system

 We’ve  learned  to  value
     
 Small  teams                              over     Big  teams
 CollaboraFon                        over           Compe??on
 Generalists                                over    Specialists
 Effort  reducFon                over                Cost  reduc?on
A  good  value  system

 We’ve  learned  to  value
     
 Small  teams                              over     Big  teams
 CollaboraFon                        over           Compe??on
 Generalists                                over    Specialists
 Effort  reducFon                over                Cost  reduc?on
 InnovaFon                                  over    Risk  mi?ga?on
It works!
It works!

Be fast, be bold!
QuesFons?

Jesper  Richter-­‐Reichhelm
          @jrirei

 slideshare.net/wooga
    wooga.com/jobs

Contenu connexe

En vedette

AWS Summit 2011: Customer Presentation - Vimeo
AWS Summit 2011: Customer Presentation - VimeoAWS Summit 2011: Customer Presentation - Vimeo
AWS Summit 2011: Customer Presentation - Vimeo
Amazon Web Services
 
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYCGetting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
Amazon Web Services
 
AWS Summit 2011 : How to become an AWS Solution Provider
AWS Summit 2011 : How to become an AWS Solution ProviderAWS Summit 2011 : How to become an AWS Solution Provider
AWS Summit 2011 : How to become an AWS Solution Provider
Amazon Web Services
 
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
Amazon Web Services
 

En vedette (11)

AWS Summit Auckland 2014 | Why Scale Matters and How the Cloud Really is Diff...
AWS Summit Auckland 2014 | Why Scale Matters and How the Cloud Really is Diff...AWS Summit Auckland 2014 | Why Scale Matters and How the Cloud Really is Diff...
AWS Summit Auckland 2014 | Why Scale Matters and How the Cloud Really is Diff...
 
AWS Summit 2011: Customer Presentation - Vimeo
AWS Summit 2011: Customer Presentation - VimeoAWS Summit 2011: Customer Presentation - Vimeo
AWS Summit 2011: Customer Presentation - Vimeo
 
Webinar: Amazon SES Management Console
Webinar: Amazon SES Management ConsoleWebinar: Amazon SES Management Console
Webinar: Amazon SES Management Console
 
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYCGetting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
Getting Started with Amazon Mechanical Turk - AWS Summit 2012 - NYC
 
High Performance Cloud Computing
High Performance Cloud ComputingHigh Performance Cloud Computing
High Performance Cloud Computing
 
AWS Summit 2011 : How to become an AWS Solution Provider
AWS Summit 2011 : How to become an AWS Solution ProviderAWS Summit 2011 : How to become an AWS Solution Provider
AWS Summit 2011 : How to become an AWS Solution Provider
 
Discussion: Adoption, Issues & Strategies for AWS Cloud Implementation (DMG21...
Discussion: Adoption, Issues & Strategies for AWS Cloud Implementation (DMG21...Discussion: Adoption, Issues & Strategies for AWS Cloud Implementation (DMG21...
Discussion: Adoption, Issues & Strategies for AWS Cloud Implementation (DMG21...
 
Disaster Recovery using Amazon Web Services - Webinar
Disaster Recovery using Amazon Web Services - WebinarDisaster Recovery using Amazon Web Services - Webinar
Disaster Recovery using Amazon Web Services - Webinar
 
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
AWS Summit 2011: Closing Keynote : The Story of Amazon.com's Move to the AWS ...
 
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your DeploymentAWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
AWS 201 Webinar Series - Rightsizing and Cost Optimizing your Deployment
 
Uses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon Redshift Uses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon Redshift
 

Similaire à Architecture Evolution at Wooga

MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012
jackdanger
 
Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDB
MongoDB
 

Similaire à Architecture Evolution at Wooga (20)

Games for the Masses (Jax)
Games for the Masses (Jax)Games for the Masses (Jax)
Games for the Masses (Jax)
 
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
 
Evoloution of Ideas
Evoloution of IdeasEvoloution of Ideas
Evoloution of Ideas
 
At Scale With Style (Erlang User Conference 2012)
At Scale With Style (Erlang User Conference 2012)At Scale With Style (Erlang User Conference 2012)
At Scale With Style (Erlang User Conference 2012)
 
At Scale With Style
At Scale With StyleAt Scale With Style
At Scale With Style
 
Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)Innovation dank DevOps (DevOpsCon Berlin 2015)
Innovation dank DevOps (DevOpsCon Berlin 2015)
 
When Devs Do Ops
When Devs Do OpsWhen Devs Do Ops
When Devs Do Ops
 
MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012MonoRails - GoGaRuCo 2012
MonoRails - GoGaRuCo 2012
 
Úvod do programování 7
Úvod do programování 7Úvod do programování 7
Úvod do programování 7
 
DockerCon US 2016 - Docker Practice in Alibaba Cloud
DockerCon US 2016 - Docker Practice in Alibaba CloudDockerCon US 2016 - Docker Practice in Alibaba Cloud
DockerCon US 2016 - Docker Practice in Alibaba Cloud
 
Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDB
 
Avatar 2.0
Avatar 2.0Avatar 2.0
Avatar 2.0
 
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and MesosIguazú: A Long-Running Job Scheduler using Docker and Mesos
Iguazú: A Long-Running Job Scheduler using Docker and Mesos
 
Gemboys
GemboysGemboys
Gemboys
 
We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018
 
ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018
 
Refactoring JavaScript Applications
Refactoring JavaScript ApplicationsRefactoring JavaScript Applications
Refactoring JavaScript Applications
 
Jug.ru 2014-j rockit architecture copy
Jug.ru 2014-j rockit architecture copyJug.ru 2014-j rockit architecture copy
Jug.ru 2014-j rockit architecture copy
 
Why we (Day) open source most of our code
Why we (Day) open source most of our codeWhy we (Day) open source most of our code
Why we (Day) open source most of our code
 
Deep Learning with Spark
Deep Learning with SparkDeep Learning with Spark
Deep Learning with Spark
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Architecture Evolution at Wooga

  • 1. ARCHITECTURE  EVOLUTION AT  WOOGA How  does  your  company  learn  new  things? Jesper  Richter-­‐Reichhelm,  @jrirei
  • 2.
  • 3. Our  games  all  look  the  same Flash  client Backend
  • 4. But  the  scale  is  interesFng 14  billion  requests  /  month
  • 5. But  the  scale  is  interesFng 14  billion  requests  /  month
  • 6. But  the  scale  is  interesFng 14  billion  requests  /  month >100,000  DB  operaFons  /  second
  • 7. But  the  scale  is  interesFng 14  billion  requests  /  month >100,000  DB  operaFons  /  second >50,000  DB  updates  /  second
  • 8. Architecture  EvoluFon  at  Wooga The  Start The  Next  Step Best  of  Two  Worlds
  • 9. Oct  2009:  Monster  World  based  on  Ruby Good  code  quality Easy  to  understand Easy  to  test Easy  to  refactor
  • 10. Oct  2009:  Monster  World  based  on  Ruby Good  code  quality Easy  to  understand Easy  to  test Easy  to  refactor
  • 11. Oct  2009:  Monster  World  based  on  Ruby Good  code  quality Easy  to  understand Easy  to  test Easy  to  refactor
  • 12. A  basic  setup  using  sharding  worked  fine lb app app app My My SQL SQL slave slave
  • 13. A  basic  setup  using  sharding  worked  fine lb app app app app app My My SQL SQL slave slave
  • 14. A  basic  setup  using  sharding  worked  fine lb app app app app app app app app app My My SQL SQL slave slave
  • 15. 250K  daily  users &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" Life  was  good !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 16. 250K  daily  users &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" Life  was  good NO  MORE !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 17. Early  sharding  hell:  8  master  and  8  slaves lb app app app app app app app app app app app app app app app app app app My My SQL SQL slave slave
  • 18. Early  sharding  hell:  8  master  and  8  slaves lb app app app app app app app app app app app app app app app app app app My My My My SQL SQL SQL SQL slave slave slave slave
  • 19. Early  sharding  hell:  8  master  and  8  slaves lb app app app app app app app app app app app app app app app app app app My My My My My My My My SQL SQL SQL SQL SQL SQL SQL SQL slave slave slave slave slave slave slave slave
  • 20. At  500K  daily  users  we  were  at  a  dead  end &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 22. Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis MySQL
  • 23. Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis MySQL Redis
  • 24. Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis MySQL Redis 256  GB  data 10%  writes
  • 25. Big  and  staFc  data  in  MySQL,  rest  goes  to  Redis MySQL Redis 256  GB  data 60  GB  data 10%  writes 50%  writes
  • 26. Redis  saved  the  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 27. Redis  saved  the  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 28. We  now  have  more  than  2  million  users  /  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" #!!$!!!" !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 29. We  now  have  more  than  2  million  users  /  day &$!!!$!!!" %$#!!$!!!" %$!!!$!!!" AWS  service #!!$!!!" disrupFon in  Ireland !" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"
  • 30. 10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all! lb lb app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app My My redis redis SQL SQL slave slave slave slave
  • 31. 10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all! lb lb app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app My My My My My redis redis SQL SQL SQL SQL SQL slave slave slave slave slave slave slave
  • 32. 10  single-­‐points-­‐of-­‐failure  -­‐  no  fun  at  all! lb lb app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app My My My My My redis redis redis redis redis SQL SQL SQL SQL SQL slave slave slave slave slave slave slave slave slave slave
  • 34. Architecture  EvoluFon  at  Wooga The  Start:  Ruby  +  AutomaFon The  Next  Step Best  of  Two  Worlds
  • 35. Stateless  servers  and  DBs Server Database
  • 36. Stateless  servers  and  DBs Server Database
  • 37. Stateless  servers  and  DBs Server Database
  • 38. Stateless  servers  and  DBs Server Database
  • 39. Stateless  servers  and  DBs Server Database
  • 40. Stateless  servers  and  DBs Server Database
  • 41. “Stateless  applica,on  servers   guarantee  one  thing:
  • 42. “Stateless  applica,on  servers   guarantee  one  thing: The  data  is  never where  you  need  it!” Paolo  Negri,  Developer  @  Wooga
  • 43. Stateful  servers  and  DBs Server Database
  • 44. Stateful  servers  and  DBs Server Database
  • 45. Stateful  servers  and  DBs Server Database
  • 46. Stateful  servers  and  DBs Server Database One  Game  Session
  • 47. Stateful  servers  and  DBs Server Database One  Game  Session
  • 48. Oct  2010:  Magic  Land  based  on  stateful  server If  DBs  are  the  problem Don’t  use  them Store  state  in  server Need  to  be  robust
  • 49. Oct  2010:  Magic  Land  based  on  stateful  server If  DBs  are  the  problem Don’t  use  them Store  state  in  server Need  to  be  robust
  • 50. Oct  2010:  Magic  Land  based  on  stateful  server If  DBs  are  the  problem Don’t  use  them Store  state  in  server Need  to  be  robust
  • 51. Stateful  servers  are  not  as  hard  as  you  think session
  • 52. Stateful  servers  are  not  as  hard  as  you  think session session session session
  • 53. Stateful  servers  are  not  as  hard  as  you  think Server session session session session
  • 54. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 55. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 56. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 57. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 58. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 59. Stateful  servers  are  not  as  hard  as  you  think Server session session session session S3
  • 60. Stateful  servers  are  not  as  hard  as  you  think Server Server Server session session session session session session session session session session session session S3
  • 61. With  stateful  server  the  DB  is  less  used Ruby  Stateless Erlang  Stateful 30,000 22,500 15,000 7,500 0 database  operations  /  sec
  • 62. With  stateful  server  the  DB  is  less  used Ruby  Stateless Erlang  Stateful 30,000 22,500 15,000 700 7,500 0 database  operations  /  sec
  • 63. Deploying  with  a  stateful  server In  order  to  bring  up  a  new  version
  • 64. Deploying  with  a  stateful  server In  order  to  bring  up  a  new  version Just  deploy  it Hot  code  replacement  is  great!
  • 65. There  are  even  more  advantages Faster  than  Ruby  (5,000  rps  /  node) -­‐ CPU  bound
  • 66. There  are  even  more  advantages Faster  than  Ruby  (5,000  rps  /  node) -­‐ CPU  bound Very  few  SPOFs -­‐ ...  and  those  are  easy  to  recover
  • 67. There  are  even  more  advantages Faster  than  Ruby  (5,000  rps  /  node) -­‐ CPU  bound Very  few  SPOFs -­‐ ...  and  those  are  easy  to  recover TransacFonal  logic -­‐ Invariants  instead  of  explicit  error  handling
  • 68. NICE! http://www.flickr.com/photos/aigle_dore/
  • 69. Architecture  EvoluFon  at  Wooga The  Start:  Ruby  +  AutomaFon The  Next  Step:  Erlang  +  S3 Company  Values
  • 70. A  good  value  system We’ve  learned  to  value
  • 71. A  good  value  system We’ve  learned  to  value Small  teams                              over   Big  teams
  • 72. A  good  value  system We’ve  learned  to  value     Small  teams                              over   Big  teams CollaboraFon                        over Compe??on
  • 73. A  good  value  system We’ve  learned  to  value     Small  teams                              over   Big  teams CollaboraFon                        over Compe??on Generalists                                over Specialists
  • 74. A  good  value  system We’ve  learned  to  value     Small  teams                              over   Big  teams CollaboraFon                        over Compe??on Generalists                                over Specialists Effort  reducFon                over Cost  reduc?on
  • 75. A  good  value  system We’ve  learned  to  value     Small  teams                              over   Big  teams CollaboraFon                        over Compe??on Generalists                                over Specialists Effort  reducFon                over Cost  reduc?on InnovaFon                                  over Risk  mi?ga?on
  • 77. It works! Be fast, be bold!
  • 78. QuesFons? Jesper  Richter-­‐Reichhelm @jrirei slideshare.net/wooga wooga.com/jobs