SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Redis to the Rescue?

Berlin Buzzwords
2011-06-07
Who
• Tim Lossen / @tlossen
• backend developer at wooga
• Berlin, Germany
apps.facebook.com/happy-hospital
Goals
• 1 million players per day
  (“DAU = daily active users”)
Goals
• 1 million players per day
  (“DAU = daily active users”)
• small production cluster
 - less operational overhead
 - cheaper
Architecture
Data Model
• user = single Redis hash
 - each entity stored in hash field
   (serialized to JSON)
• custom Ruby mapping layer
  (“Remodel”)
{“level”: 4,
1220032045     u1
                       “xp”: 241}

             u1_pets   [“p7”, “p8”]

                       {“pet_type”:
               p7
                          “Cat”}
                       {“pet_type”:
               p8
                          “Dog”}
                       {“level”: 1,
1234599660     u1
                        “xp”: 22}

             u1_pets     [“p3”]

               ...          ...
{“level”: 4,
1220032045     u1
                       “xp”: 241}

             u1_pets   [“p7”, “p8”]

                       {“pet_type”:
               p7
                          “Cat”}
                       {“pet_type”:
               p8
                          “Dog”}
                       {“level”: 1,
1234599660     u1
                        “xp”: 22}

             u1_pets     [“p3”]

               ...          ...
Setup A (July 2010)
Setup B (Nov 2010)
Setup B (Dec 2010)
Analysis
• Redis virtual memory not
  compatible with:
 -   persistence
 -   replication
Setup B’ (Dec 2010)
Setup C (Dec 2010)
Setup D (May 2011)
Status
• peak traffic:
 - 3000 requests/s
 - 35000 Redis operations/s
• average backend response time:
 - 10 ms
appdata.com
Goals
• 1 million DAU
• small production cluster
Production Cluster


         Text




                (1x intel core i7 X980,
                 6 cores, 24 gig ram)
Goals
• 1 million DAU
• small production cluster
Redis Highlights
• high sustained throughput /
  performance
• very stable
• active & helpful community
Redis Gotchas
• memory consumption
 - fragmentation!
• durability
Q&A
redis.io
github.com/tlossen/remodel
wooga.com/jobs

Más contenido relacionado

Más de Wooga

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
 
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...Wooga
 
DevOps the Wooga way (Webmontag Berlin)
DevOps the Wooga way (Webmontag Berlin)DevOps the Wooga way (Webmontag Berlin)
DevOps the Wooga way (Webmontag Berlin)Wooga
 
Why Having Impact Matters for Good Developers (GOTO Berlin)
Why Having Impact Matters for Good Developers (GOTO Berlin)Why Having Impact Matters for Good Developers (GOTO Berlin)
Why Having Impact Matters for Good Developers (GOTO Berlin)Wooga
 
Beyond Devops_GOTOBerlin2013_Tim Lossen
Beyond Devops_GOTOBerlin2013_Tim LossenBeyond Devops_GOTOBerlin2013_Tim Lossen
Beyond Devops_GOTOBerlin2013_Tim LossenWooga
 
Social games and their clean code_Clean Code Days_Dresden 2013
Social games and their clean code_Clean Code Days_Dresden 2013Social games and their clean code_Clean Code Days_Dresden 2013
Social games and their clean code_Clean Code Days_Dresden 2013Wooga
 

Más de Wooga (20)

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
 
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
How to stand out in a hit driven business - Game Connection Paris 2013 - SebK...
 
DevOps the Wooga way (Webmontag Berlin)
DevOps the Wooga way (Webmontag Berlin)DevOps the Wooga way (Webmontag Berlin)
DevOps the Wooga way (Webmontag Berlin)
 
Why Having Impact Matters for Good Developers (GOTO Berlin)
Why Having Impact Matters for Good Developers (GOTO Berlin)Why Having Impact Matters for Good Developers (GOTO Berlin)
Why Having Impact Matters for Good Developers (GOTO Berlin)
 
Beyond Devops_GOTOBerlin2013_Tim Lossen
Beyond Devops_GOTOBerlin2013_Tim LossenBeyond Devops_GOTOBerlin2013_Tim Lossen
Beyond Devops_GOTOBerlin2013_Tim Lossen
 
Social games and their clean code_Clean Code Days_Dresden 2013
Social games and their clean code_Clean Code Days_Dresden 2013Social games and their clean code_Clean Code Days_Dresden 2013
Social games and their clean code_Clean Code Days_Dresden 2013
 

Redis to the Rescue (Buzzwords Berlin)