Your SlideShare is downloading. ×

Redis at the guardian

1,832
views

Published on

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

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,832
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
27
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. REDIS AT GUARDIAN.CO.UK Michael Brunton-Spall - @bruntonspall
    • 2. MPS’ EXPENSES (2)
    • 3. MPs’ Expenses 2
    • 4. Before RedisOriginally selected a random article to start reviewingSQL = ORDER BY RAND() LIMIT 1Inefficient and horrible
    • 5. If in doubt, ask
    • 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. SDIFFSTORE
    • 8. SRANDMEMBER
    • 9. SOULMATES
    • 10. Soulmates
    • 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. Management SwitchesWhats the problem? We’re basically a java shop In Java, management switches are easy In python not so much
    • 13. How Java Works
    • 14. How Python Works
    • 15. Soulmates Architecture Django Django Frontend Frontend Redis Redis Scala API Scala API Solr Slave Solr Slave WebApp WebApp Solr Master MongoDB MongoDB
    • 16. Switches must be externalisedNormally we’d use the database but Soulmates django app doesn’t have a database So we used redis
    • 17. Define and initialise
    • 18. Implementation
    • 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

    ×