SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
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

Contenu connexe

Plus de Tim Lossen

Apocalypse Later
Apocalypse LaterApocalypse Later
Apocalypse LaterTim Lossen
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing FailureTim Lossen
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing FailureTim Lossen
 
Enemy of the State?
Enemy of the State?Enemy of the State?
Enemy of the State?Tim Lossen
 
All Your Core Are Belong To Us
All Your Core Are Belong To UsAll Your Core Are Belong To Us
All Your Core Are Belong To UsTim Lossen
 
Podularity FTW!
Podularity FTW!Podularity FTW!
Podularity FTW!Tim Lossen
 
Cubic Foot Gardening
Cubic Foot GardeningCubic Foot Gardening
Cubic Foot GardeningTim Lossen
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard ManiaTim Lossen
 
Event-Stream Processing with Kafka
Event-Stream Processing with KafkaEvent-Stream Processing with Kafka
Event-Stream Processing with KafkaTim Lossen
 
Treasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRubyTreasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRubyTim Lossen
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard ManiaTim Lossen
 
JRuby vs. Rubinius
JRuby vs. RubiniusJRuby vs. Rubinius
JRuby vs. RubiniusTim Lossen
 
The Smallest Cluster in the World
The Smallest Cluster in the WorldThe Smallest Cluster in the World
The Smallest Cluster in the WorldTim Lossen
 
Announcing Euruko 2011
Announcing Euruko 2011Announcing Euruko 2011
Announcing Euruko 2011Tim Lossen
 
Memory: The New Disk
Memory: The New DiskMemory: The New Disk
Memory: The New DiskTim Lossen
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Tim Lossen
 
Cassandra vs. Redis
Cassandra vs. RedisCassandra vs. Redis
Cassandra vs. RedisTim Lossen
 
An Introduction to Membase
An Introduction to MembaseAn Introduction to Membase
An Introduction to MembaseTim Lossen
 

Plus de Tim Lossen (20)

Apocalypse Later
Apocalypse LaterApocalypse Later
Apocalypse Later
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing Failure
 
Embracing Failure
Embracing FailureEmbracing Failure
Embracing Failure
 
Enemy of the State?
Enemy of the State?Enemy of the State?
Enemy of the State?
 
Beyond Devops
Beyond DevopsBeyond Devops
Beyond Devops
 
All Your Core Are Belong To Us
All Your Core Are Belong To UsAll Your Core Are Belong To Us
All Your Core Are Belong To Us
 
Podularity FTW!
Podularity FTW!Podularity FTW!
Podularity FTW!
 
Cubic Foot Gardening
Cubic Foot GardeningCubic Foot Gardening
Cubic Foot Gardening
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard Mania
 
Event-Stream Processing with Kafka
Event-Stream Processing with KafkaEvent-Stream Processing with Kafka
Event-Stream Processing with Kafka
 
Into the Void
Into the VoidInto the Void
Into the Void
 
Treasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRubyTreasure Island -- Concurrency in JRuby
Treasure Island -- Concurrency in JRuby
 
Dashboard Mania
Dashboard ManiaDashboard Mania
Dashboard Mania
 
JRuby vs. Rubinius
JRuby vs. RubiniusJRuby vs. Rubinius
JRuby vs. Rubinius
 
The Smallest Cluster in the World
The Smallest Cluster in the WorldThe Smallest Cluster in the World
The Smallest Cluster in the World
 
Announcing Euruko 2011
Announcing Euruko 2011Announcing Euruko 2011
Announcing Euruko 2011
 
Memory: The New Disk
Memory: The New DiskMemory: The New Disk
Memory: The New Disk
 
Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?Key-Value-Stores -- The Key to Scaling?
Key-Value-Stores -- The Key to Scaling?
 
Cassandra vs. Redis
Cassandra vs. RedisCassandra vs. Redis
Cassandra vs. Redis
 
An Introduction to Membase
An Introduction to MembaseAn Introduction to Membase
An Introduction to Membase
 

Dernier

Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseri bangash
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 

Dernier (20)

Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 

Redis to the Rescue?