Redis at the guardian

1,940
-1

Published on

A presentation about the use of Redis at guardian.co.uk given at the London Redis meetup

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

  • Be the first to like this

No Downloads
Views
Total Views
1,940
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Redis at the guardian

    1. 1. REDIS AT GUARDIAN.CO.UK Michael Brunton-Spall - @bruntonspall
    2. 2. MPS’ EXPENSES (2)
    3. 3. MPs’ Expenses 2
    4. 4. Before RedisOriginally selected a random article to start reviewingSQL = ORDER BY RAND() LIMIT 1Inefficient and horrible
    5. 5. If in doubt, ask
    6. 6. With RedisMaintain redis set of all available pages per assignmentMaintain redis set of reviewed pages per assignmentSDIFFSTORE the two setsUse SRANDMEMBER on the stored set
    7. 7. SDIFFSTORE
    8. 8. SRANDMEMBER
    9. 9. SOULMATES
    10. 10. Soulmates
    11. 11. What do we use it for?github.com/simonw/django-redis-monitor Written internally by Simon Willison and Daniel Vydra Counts requests per second / SQLops per second in djangoManagement switches
    12. 12. Management SwitchesWhats the problem? We’re basically a java shop In Java, management switches are easy In python not so much
    13. 13. How Java Works
    14. 14. How Python Works
    15. 15. Soulmates Architecture Django Django Frontend Frontend Redis Redis Scala API Scala API Solr Slave Solr Slave WebApp WebApp Solr Master MongoDB MongoDB
    16. 16. Switches must be externalisedNormally we’d use the database but Soulmates django app doesn’t have a database So we used redis
    17. 17. Define and initialise
    18. 18. Implementation
    19. 19. Redis SwitchesHit a URL on any server, any process to toggle switchAll processes are able to check that switch laterRedis processes are local to the machine

    ×