三里屯摇滚 发表于 2012-02-16 19:45

Digg 采用Redis作计数存储

Digg 采用Redis作计数存储





最近 Digg 发布了一项新的功能,添加了对文章浏览数的显示,这一功能的一大卖点是其实时性。而支持此实时浏览量计数的,正是Redis。



This counting is done in real time. We watch the server logs for fetches of the permalink pages urls with those like /news/topic/title and the exit click urls are redirects like through the /story/r/title. When we see a fetch, we update counters in Redis which writes to memory very quickly so the numbers change pretty much immediately. On the web page side we read the counters live from Redis and merge the data into the item data that is fetched from Cassandra or (more likely) Memcached. Redis rocks!
来源地址:Explaining the Story View Counts

小鬼萌萌控 发表于 2012-02-17 22:28

谢谢分享
页: [1]
查看完整版本: Digg 采用Redis作计数存储