Redis

779 views
696 views

Published on

Redis - a Fast key-value memory based database

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

  • Be the first to like this

No Downloads
Views
Total views
779
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Redis

  1. 1. Ensky Lin
  2. 2. Redis is a Fast, Memory-based key-value storage database.
  3. 3. And more…
  4. 4. Features• Data types• Publish–subscribe• Transactions• Replication• Persistence• Partition
  5. 5. Licence
  6. 6. Fast• Almost the same as Memcached
  7. 7. Fast• Even more, the bottleneck may from your network card.
  8. 8. Support lots of complexoperations, you don’t need to process data in client side. a lot of I/O is sometimes needed
  9. 9. Data types• Strings – Binary safe, with a maximum of 512MB• Lists• Sets• Sorted sets – Set with score• Hashes – Perfect to represent object
  10. 10. Publish–subscribe• Redis supports publish-subscribe mode.• You can subscribe some topics, and when someone publish topic matches your interest, redis send it to you.
  11. 11. Transactions• Redis also support transactions.• you can execute multiple command in a single step.• Either all of the commands or none are processed > MULTI OK > INCR foo QUEUED > INCR bar QUEUED > EXEC 1) (integer) 1 2) (integer) 1
  12. 12. Replication• Official Master-slave replication – Write in Master, Read in Slaves
  13. 13. Persistence• You can choose persistence yourself – RDB • Take snapshot in an interval • Fast • may loss several minutes data if kill -9 – AOF • Log-based, redo whole steps since startup • Still fast enough • may loss 1 second data if kill -9 – None(like memcached)
  14. 14. Partition• There are three way that is recommend by redis official group. – Redis Cluster • Official way, Under development – Twemproxy • Twitter developed, support redis and memcached. – Clients supporting consistent hashing
  15. 15. Twemproxy• Twemproxy is an intermediate layer between clients and Redis instances.• Reliably handle partitioning Redis instance Twem Client proxy Redis instance Redis Twem instance Client proxy Redis instance
  16. 16. Many clients for nearly all languages
  17. 17. • ActionScript • Lua• C / C++ • Node.js• C# • Objective-C• Clojure • Perl• Lisp • PHP• Dart • Python• Erlang • Ruby• Fancy • Scala• Go • Smalltalk• Haskell • Tcl• haXe• Io• Java
  18. 18. Who is using redis?
  19. 19. Redis project is sponsored by
  20. 20. And use by …
  21. 21. Thank you!

×