Your SlideShare is downloading. ×
0
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Handling Redis failover with ZooKeeper
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Handling Redis failover with ZooKeeper

12,218

Published on

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

No Downloads
Views
Total Views
12,218
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
232
Comments
0
Likes
37
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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. Handling Redis failover with ZooKeeper Ryan LeCompte BaRuCo Lightning Talk September 2012
    • 2. Me• Rubyist at Spreecast in San Francisco• redis_failover, method_locator, synchronizable• http://github.com/ryanlecompte• lecompte@gmail.com• @ryanlecompte
    • 3. Typical Redis Setup
    • 4. Master Dies :-(
    • 5. What happens to your data andconnected clients?• Resque Jobs?• Sidekiq Jobs?• Cached pages?• Cached stats?• Rubygems?
    • 6. Scramble to manuallyreconfigure slave as master
    • 7. Update all Redis clients totalk to the new master
    • 8. Restart production servicesso they can see the new config
    • 9. What do we really want to do? NOTHING
    • 10. Failover should be safe and automatic
    • 11. Let’s talk aboutZooKeeper
    • 12. Open source ApacheProject (originally from Yahoo)
    • 13. Provides a set of simpleprimitives to help you build powerfuldistributed applications
    • 14. Automatically handlesnetwork partitions &quorum management
    • 15. Replicated, HighlyAvailable, Ordered,Battle-proven
    • 16. Used by Yahoo, Netflix, Rackspace, Hadoop, Neo4j, etc
    • 17. How can I useZooKeeper in my architecture?
    • 18. Distributed Configuration(update thread pool sizes & other settings without requiring a server restart)
    • 19. Distributed Locking (only one process should beable to do something at a time)
    • 20. Priority Queues
    • 21. Leader Election, Group Membership & more
    • 22. Practical application:Using ZooKeeper to build automatic failover for Redis
    • 23. redis_failoverhttp://github.com/ryanlecompte/redis_failover
    • 24. Provides a smart “failover-aware” client that wrapsexisting Ruby client forRedis
    • 25. Clients automaticallyconnect to ZooKeeperand register for watchnotifications
    • 26. Node Managers monitorRedis servers for availabilityand automatically informclients of failover viaZooKeeper
    • 27. Architecture
    • 28. RedisFailover::Client Example# create new client with list of ZooKeeper serversclient = RedisFailover::Client.new(:zkservers => localhost:2181,localhost:2182,localhost:2183)# write operations automatically routed to masterclient.set(‘foo’, ‘bar’)# read operations automatically routed to a slaveclient.smembers(‘data’)
    • 29. Companies using redis_failover• Papertrail• Backupify• MediaPiston• IDT Corporation• others
    • 30. Consider incorporatingZooKeeper into your overallarchitecture.Utilize the primitives it gives you forsolving your next distributedprogramming challenge.
    • 31. Don’t let your Redis serversgo unmanaged in production.Consider usingredis_failover to sleepbetter at night.
    • 32. Thanks for listening! http://github.com/ryanlecompte/redis_failover Questions? Ask me at the beach!

    ×