Storage of many log files

前端 未结 5 659
借酒劲吻你
借酒劲吻你 2021-02-08 02:57

I have a system which is receiving log files from different places through http (>10k producers, 10 logs per day, ~100 lines of text each).

I would like to store them t

5条回答
  •  萌比男神i
    2021-02-08 03:37

    I'd pick the very first solution.

    I don't see why would you need DB at all. Seems like all you need is to scan through the data. Keep the logs in the most "raw" state, then process it and then create a tarball for each day.

    The only reason to aggregate would be to reduce the number of files. On some file systems, if you put more than N files in a directory, the performance decreases rapidly. Check your filesystem and if it's the case, organize a simple 2-level hierarchy, say, using the first 2 digits of producer ID as the first level directory name.

提交回复
热议问题