Redis at the guardian
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Redis at the guardian

  • 2,205 views
Uploaded 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

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,205
On Slideshare
2,094
From Embeds
111
Number of Embeds
5

Actions

Shares
Downloads
27
Comments
0
Likes
0

Embeds 111

http://lanyrd.com 106
http://coderwall.com 2
http://paper.li 1
https://lanyrd.com 1
http://translate.googleusercontent.com 1

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