Redis 坑

8,212 views
8,016 views

Published on

weibo.com 使用 redis 过程中,踩过的坑

Published in: Technology, Business

Redis 坑

  1. 1. Redis @http://weibo.com/tangfl
  2. 2. Redis• disk backed in-memory database• support • k-v • hash • list • set (sorted set) • rdb/aof , master - slave
  3. 3. • int k-v 104 byte• • rediscounter • hash • hash-max-zipmap-size
  4. 4. • • rehash • get set • redis 48g 4 8g 2 18g 34g 8 13 08:27 iPhone• •
  5. 5. • • rehash • write aof• • • aof
  6. 6. • master -> slave • master dump rdb, and send to slave • master send every cmd to slave•• • • pos eRedis
  7. 7. • rdb • dump all data to disk • fork • •
  8. 8. • aof • append every write cmd to aof • long recover time • must bgrewrite from time to time • bgrewrite •
  9. 9. • • eRedis • rdb + aof with postion • write • write 2.4 rc8
  10. 10. • Java • server • jedis vs jredis • pool lifo=false block time etc • pool • HA
  11. 11. pipeline•
  12. 12. hgetAll•• mc cache
  13. 13. Thanks @http://weibo.com/tangfl

×