Redis overview for Software Architecture Forum

4,792 views

Published on

Quick 15 minute overview of redis' feature set

Published in: Technology
1 Comment
5 Likes
Statistics
Notes
No Downloads
Views
Total views
4,792
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
92
Comments
1
Likes
5
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Snapshotting: periodically dump entire dataset to disk\n- Not durable, can lose latest data\n- every 60 seconds if there have been 1000 key changes...\n\nAOF: Append commands to a log\n- log rewriting \n- fully durable: fsync per command (slow & safe), every second (fast & pretty safe) or never (blazing & unsafe)\n\nfsync -- synchronize a file's in-core state with that on disk\n
  • Snapshotting: periodically dump entire dataset to disk\n- Not durable, can lose latest data\n- every 60 seconds if there have been 1000 key changes...\n\nAOF: Append commands to a log\n- log rewriting \n- fully durable: fsync per command (slow & safe), every second (fast & pretty safe) or never (blazing & unsafe)\n\nfsync -- synchronize a file's in-core state with that on disk\n
  • \n
  • \n
  • \n
  • \n
  • Redis virtual memory going to be scrapped in favour of disk storage\n\nBoth keys and values will be backed by disk\n
  • Redis virtual memory going to be scrapped in favour of disk storage\n\nBoth keys and values will be backed by disk\n
  • Redis virtual memory going to be scrapped in favour of disk storage\n\nBoth keys and values will be backed by disk\n
  • \n
  • \n
  • \n
  • \n
  • ...cache invalidation and naming things\n\nPhil Karlton\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Redis overview for Software Architecture Forum

    1. 1. More than just a key value datastore Christopher Spring
    2. 2. What is redis?
    3. 3. remote dictionary server
    4. 4. remote dictionary server Key => String Key => Set Key => Hash Key => List Key => Sorted Set
    5. 5. Key features
    6. 6. Key features
    7. 7. Key featuresCheap API for lists, sets...
    8. 8. Key featuresCheap API for lists, sets...Atomic operations
    9. 9. Key featuresCheap API for lists, sets...Atomic operationsTransactions
    10. 10. Key featuresCheap API for lists, sets...Atomic operationsTransactionsKey expiry
    11. 11. In memory storage
    12. 12. In memory storageSingle process event driven design
    13. 13. In memory storageSingle process event driven designNon blocking
    14. 14. In memory storageSingle process event driven designNon blocking100k+ operations per second
    15. 15. Asynchronous persistence
    16. 16. Asynchronous persistence Snapshotting save 60 1000
    17. 17. Asynchronous persistence Snapshotting save 60 1000 Append only file Log rewriting fsync
    18. 18. Master slave replication slaveof 192.168.1.1 6379
    19. 19. Master slave replication slaveof 192.168.1.1 6379 Multiple slaves
    20. 20. Master slave replication slaveof 192.168.1.1 6379 Multiple slaves Slaves of slaves
    21. 21. Master slave replication slaveof 192.168.1.1 6379 Multiple slaves Slaves of slaves Scalability
    22. 22. Master slave replication slaveof 192.168.1.1 6379 Multiple slaves Slaves of slaves Scalability Defer save to slaves
    23. 23. Redis Virtual Memory
    24. 24. Redis Virtual MemoryOnly values swapped out to disk
    25. 25. Redis Virtual MemoryOnly values swapped out to diskMost recent values in memory
    26. 26. Redis Virtual MemoryOnly values swapped out to diskMost recent values in memory ...disk store
    27. 27. Message pub/sub
    28. 28. Message pub/subMessages are published to channelsPUBLISH chat "Hello Redis!"
    29. 29. Message pub/subMessages are published to channelsPUBLISH chat "Hello Redis!"Subscribers declare which channels they’re interested inSUBSCRIBE chat
    30. 30. Message pub/subMessages are published to channelsPUBLISH chat "Hello Redis!"Subscribers declare which channels they’re interested inSUBSCRIBE chatSubscribers and publishers don’t care about each other
    31. 31. Message pub/subMessages are published to channelsPUBLISH chat "Hello Redis!"Subscribers declare which channels they’re interested inSUBSCRIBE chatSubscribers and publishers don’t care about each otherSupports pattern subscriptionPSUBSCRIBE f*
    32. 32. There are only two hardthings in computer science...
    33. 33. DB + caching
    34. 34. DB + cachingMultiple copies of data
    35. 35. DB + cachingMultiple copies of dataMainly scaling reads
    36. 36. DB + cachingMultiple copies of dataMainly scaling readsNo higher level functions
    37. 37. Redis
    38. 38. How we use redis
    39. 39. How we use redisStatistics & Caching
    40. 40. How we use redisStatistics & CachingQueueing
    41. 41. How we use redisStatistics & CachingQueueingThrottling
    42. 42. How we use redisStatistics & CachingQueueingThrottlingInter process communication*
    43. 43. When to consider redis
    44. 44. When to consider redisYou like it fast
    45. 45. When to consider redisYou like it fastYou need more than just key value pairs
    46. 46. When to consider redisYou like it fastYou need more than just key value pairsSmall dataset that can fit into memory
    47. 47. When to consider redisYou like it fastYou need more than just key value pairsSmall dataset that can fit into memoryYour dataset isn’t critical*
    48. 48. • C • Java• C# • Lua• C++ • Node.js• Clojure • Objective-c• Common List • Perl• Erlang • PHP• Go • Python• Haskell • Scala• haXe • Smalltalk• Io • Tcl
    49. 49. Thanks!

    ×