| The dev blog for cloudno.de, a new Node.js hosting platform.

Website Statistics Using Node.js and Redis

While looking for a statistics server for Cloudno.de I found several references to Redis, which matches perfectly the use case. When Salvatore Sanfilippo, aka antirez, designed Redis, he was working on a real-time stats package. So many Redis features support this kind of activity. A particual good fit are the fast, atomically incremented counters which can be used in multiple dimensions like: hits-by-app, hits-by-url, hits-by-day, plus combinations. The following gist gives a good idea:

A simple hosted node.js application adds a RESTful webservice interface. This statistics server can be queried by the platform which displays the data and charts. So you have always a view on how your apps are doing.