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



分类 Redis · tag , , ,