Digg 采用Redis作計(jì)數(shù)存儲(chǔ)
最近 Digg 發(fā)布了一項(xiàng)新的功能,添加了對(duì)文章瀏覽數(shù)的顯示,這一功能的一大賣點(diǎn)是其實(shí)時(shí)性。而支持此實(shí)時(shí)瀏覽量計(jì)數(shù)的,正是Redis。
6.png (89.05 KB, 下載次數(shù): 56)
下載附件
2012-02-16 19:45 上傳
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
|