V
V
Vit2015-06-11 14:37:42
MySQL
Vit, 2015-06-11 14:37:42

In which database to store logs of visits?

Hello! I need to keep logs of visits of site users. At the moment I am writing everything to a MySQL table. Once every 5 min. statistics are recalculated. Sooner or later there will be many records, 100 million, 500 million records.
What is the best way to store this information? In which database, so that it would also be convenient to recalculate the indicators?
Every 10 million records take up 1GB of space.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
L
Lesha Kiselev, 2015-06-11
@Yakud

You can use the Logstash + ElasticSearch + Kibana bundle.
Logstash - accepts and parses logs.
ElasticSearch - storage.
Kibana - data visualization.
https :
//www.elastic.cops . I have experience with this kind of connection. Now there are about 1.5 billion events in the repository on 4 servers. Works without problems.

A
Arris, 2015-06-11
@Arris

First question: For how long should they be stored? Forever? Is there any sense in this?
The second question: how many visitor records ALREADY and for what period. "Sooner or later" - it can be in a week, and in a year, and never.
If you do not answer these questions in advance, it may turn out that you are solving a problem that does not need to be solved , because the available tools (mysql or even storing logs in CSV) are enough .

B
beduin01, 2015-06-11
@beduin01

Store in MySQL and don't worry

V
Vlad Zhivotnev, 2015-06-13
@inkvizitor68sl

If you really need to solve this problem, then monga + sharding (about volume).

A
Andrey Burov, 2015-06-11
@BuriK666

yes in any, you can break it into several tables (for example, by months).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question