Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best database for a Statistics System [closed]

I need to build a Statistics System but I don't know if MongoDB would be the best solution. The system needs to track couple of things and than display the information. For example of a similar thing - a site, and every user that first visits the site adds a row with information about him. The system needs to store the data as fast as possible, and, for example, it creats a chart of the growth of users viewing the page using Google Chrome. Also, if a user visits again, a field in the users's already row is updated (say a field called "Days").

The system needs to handle 200,000 new visits a day (new records), 20,000,000 users visits again (updates) a day, and 800,000,000 DB records. It needs also to output the data fast - for example, creating a chart of how much users visits each day from England, using Google Chrome, etc.

So what would be the best DB to handle this data? Would MongoDB handle this fine?

Thanks!

like image 888
Eli_Rozen Avatar asked Mar 13 '12 22:03

Eli_Rozen


1 Answers

Mongodb allows atomic updates and scales very well. That's exactly what it's designed for. But keep in mind two things: beware the disk space, it may run out very quickly and if you need quick stats (like region coverage, traffic sources, etc.), you have to precompute them. The fastest way is to build a simple daemon for this that would keep all numbers in memory and save it hourly/daily.

like image 154
vissi Avatar answered Sep 20 '22 10:09

vissi