The best database for statistics system

I need to create a statistics system, but I don't know if MongoDB would be a better solution. The system needs to track a couple of things and display information. For example, a similar thing is a site, and each user who visits a site for the first time adds a line with information about it. The system needs to store data as quickly as possible, and, for example, it creates a growth chart for users viewing the page using Google Chrome. In addition, if the user visits again, the field in the existing line is updated (say, the Days field).

The system should process 200,000 new visits per day (new entries), 20,000,000 user visits (updates) per day, and 800,000,000 database entries. It should also quickly output data - for example, by creating a diagram of how many users visit each day from England, using Google Chrome, etc.

So what would be the best database to process this data? Can MongoDB handle this penalty?

Thanks!

+6
source share
3 answers

Mongodb allows you to get atomic updates and scale very well. This is exactly what it is intended for. But keep in mind two things: beware of disk space, it can end very quickly, and if you need fast statistics (for example, coverage of a zone, traffic sources, etc.), you should precompute them. The quickest way is to create a simple daemon for this, which will store all the numbers in memory and store it hourly / daily.

+3
source

Redis is a very good choice for him, provided that you have a lot of RAM or a strategy for data over several nodes. this is good because:

  • it is in memory, so you can analyze in real time (I think the bit statistics uses in real time). in fact, it was originally created for this.

  • it is very fast, you can save hundreds of thousands of updates per second.

  • he has atomic operations.

  • it has sorted sets that are great for time series.

+3
source

RDM Workgroup is a database management system for desktop and server environments, as well as in-memory speed.

You can also use the save function; where you manage the data in memory and then transfer the data to disk when the application shuts down, so there is no data loss.

It is based on a network model with an intuitive interface, so its scalability is first-class and will be able to handle the large load of new visitors that you expect.

0
source

Source: https://habr.com/ru/post/910640/


All Articles