Redis replication dcshi

5,145 views

Published on

Published in: Technology, News & Politics
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,145
On SlideShare
0
From Embeds
0
Number of Embeds
3,712
Actions
Shares
0
Downloads
19
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Redis replication dcshi

  1. 1. 施俊伟 dcshihttp://weibo.com/dcshihttp://twitter.com/dcshi http://dcshi.com
  2. 2. What is redisRedis is an open source, advanced key-valuestore.keys can contain strings, hashes, lists,sets ,sortedsets.http://redis.iohttp://groups.google.com/group/redis-db
  3. 3. What is in redis
  4. 4. Replication
  5. 5. Advantage vs disadvantageAdvantage: simple->kissDisadvantage: full resync master负载大http://groups.google.com/group/redis-db/browse_thread/thread/6badf6abf8f44eb0
  6. 6. 优化?1.定期dump rdb,并记录当前AOF偏移(AOF文件按文件大小进行自动分割滚动).slave发送sync命令时,需要把rdb文件和指定aof文件偏移后的增量数据发送给slave即可.2.优化slave短暂断开的情况,master不会马上释放该slave连接.等待一段时间,并缓存该期间内的写,如果此slave再次发送sync同步命令,则可以满足增量同步Q:断开重连是一个新的tcp连接,master怎么知道是同一个slave?
  7. 7. QA

×