Answer the question
In order to leave comments, you need to log in
Is it reasonable to store logs in redis?
There is an API and it is necessary to record all API requests grouped by user_id. Now I am writing everything to radishes, but as it turned out, this is not an optimal log storage, since when the RAM under redis runs out, difficulties with writing / reading to radishes may begin. Is it so?
Answer the question
In order to leave comments, you need to log in
Yes, that's right, radish stores everything in memory, although it synchronizes to disk. Writing logs there is a bad idea. If using LIST, do LTRIM at least to clean up old logs and keep the last N entries. But it's better to transfer somewhere in logstash.net , for example
If the data is of an analytical nature, with "natural" indexes, then try looking at the mongo capped collection. The data itself will be "cleaned", and at the same time it is a quick access to the latest data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question