Storage of many log files

前端 未结 5 657
借酒劲吻你
借酒劲吻你 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条回答
  •  轮回少年
    2021-02-08 03:49

    I would write one file per upload, and one directory/day as you first suggested. At the end of the day, run your processing over the files, and then tar.bz2 the directory.

    The tarball will still be searchable, and will likely be quite small as logs can usually compress quite well.

    For total data, you are talking about 1GB [corrected 10MB] a day uncompressed. This will likely compress to 100MB or less. I've seen 200x compression on my log files with bzip2. You could easily store the compressed data on a file system for years without any worries. For additional processing you can write scripts which can search the compressed tarball and generate more stats.

提交回复
热议问题