Redis to the Rescue?

1,938 views
1,857 views

Published on

Published in: Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,938
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Redis to the Rescue?

  1. 1. Redis to the Rescue?Berlin Buzzwords2011-06-07
  2. 2. Who• Tim Lossen / @tlossen• backend developer at wooga• Berlin, Germany
  3. 3. apps.facebook.com/happy-hospital
  4. 4. Goals• 1 million players per day (“DAU = daily active users”)
  5. 5. Goals• 1 million players per day (“DAU = daily active users”)• small production cluster - less operational overhead - cheaper
  6. 6. Architecture
  7. 7. Data Model• user = single Redis hash - each entity stored in hash field (serialized to JSON)• custom Ruby mapping layer (“Remodel”)
  8. 8. {“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”] ... ...
  9. 9. {“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”] ... ...
  10. 10. Setup A (July 2010)
  11. 11. Setup B (Nov 2010)
  12. 12. Setup B (Dec 2010)
  13. 13. Analysis• Redis virtual memory not compatible with: - persistence - replication
  14. 14. Setup B’ (Dec 2010)
  15. 15. Setup C (Dec 2010)
  16. 16. Setup D (May 2011)
  17. 17. Status• peak traffic: - 3000 requests/s - 35000 Redis operations/s• average backend response time: - 10 ms
  18. 18. appdata.com
  19. 19. Goals• 1 million DAU• small production cluster
  20. 20. Production Cluster Text (1x intel core i7 X980, 6 cores, 24 gig ram)
  21. 21. Goals• 1 million DAU• small production cluster
  22. 22. Redis Highlights• high sustained throughput / performance• very stable• active & helpful community
  23. 23. Redis Gotchas• memory consumption - fragmentation!• durability
  24. 24. Q&A
  25. 25. redis.iogithub.com/tlossen/remodelwooga.com/jobs

×