您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > 新浪微博开放平台redis 实践
Redis@fl•Redis•Redis••redis•redis•Redis•inmemory(database?)•datacandumptodisk•manyusefuldatastructure•FASTbothreadandwrite•westartusefrom2.0,now2.4=feed++=feed++•feed••=feed++=feed++•••=feed++=feed++•••@•@•=feed++=feed++•••@•@•=feed++=feed++•••@•@•=feed++=feed++•••@•@•=feed++=feed++•feed•mysql•mc=feed++•=feed++•mysql:relation.following•fromuid,touid,addtime•select*fromfollowingwherefromuid=?orderbyaddtimedesc•select*fromfollowingwheretouid=?orderbyaddtimedesc•fromuid,touid=feed++•mysql:relation.followingrelation.follower•fromuid,touid,addtime•select*fromfollowingwherefromuid=?orderbyaddtimedesc•select*fromfollowerwheretouid=?orderbyaddtimedesc•=feed++•••••=feed++•ta•ta•ta•=feed++••c/java•••=feed++•redis•hash:•key:userid•fields:friendsids•value:addtime=feed++•redis•hash:•hsetfromuid.followingtouidaddtime•hsettouid.followerfromuidaddtime•hgetAllfromuid.following•hgetAlltouid.follower?•11,704,598@WedSep721:46:33CST2011=feed++•hash:getoneorgetall•hash-max-zip-size•64-2561/3•cpu•hgetAllcosttoomuchcpu•addmc•highdelay=feed++=feed++••cache?wastetoomuchmem•storage?•rdbmaylostdata•aofr/wtooslow,recovertooslow•alldatainmem,wastemoney•HA:masterslave?NOWAY•memoryfragment=feed++=feed++••mysqlbinlogqueueJavaProcessorredis•mysqlbinlogtriggerredis=feed++••redis@weibofornow:•TB•growingfast=feed++••@mysqlmodified+innodb•followinglistofauserinonecolumn•stillunderdev=feed++•=feed++••••@••=feed++=feed++•••@•••js=feed++•mc+queue+mysql•mysql•mcmysql•mc=feed++•••••=feed++•redis••k-v,100byteperk-v•mc••hash,hgetpipelineslow=feed++••rdb?maylostdata•aof?growtoofast(4G/day)•bgsave/bgrewriteaofinfluenceparent=feed++=feed++•redisrolling••••key=feed++••rediscounter@•array,notlinkedlist•mallocallmemwhenstart•hashkeytoposition•writedisk:asyn&slowdown•addpositiontoaoffile••rediscounter+innodb•autorollcolddatatodisk=feed++=feed++••@TimYang•@XiaoJunHong••redis(delay)-mc(throughput)-javahashmap••cache•storage••••+••••/•••••rdboraof•••••rehash•HA/Cluster•Redis•Jedis••••CPU•Redis•hsetwithbighash-max-zip-size•hgetAll•mc•••••ThanksPS.Wearehiring!contactmevia@Q&A@fl
本文标题:新浪微博开放平台redis 实践
链接地址:https://www.777doc.com/doc-5061488 .html