Best Practices for Continuous Logging

Hello all,

I’m sure a similar question has been asked many times but I couldn’t quite find an answer that I felt comfortable with.

I’m running InfluxDB 1 on a Raspberry Pi 4B with 4GB RAM. I am using Node-RED to log sensor data and would like to log several measurements once a second. I am pretty novice when it comes to data bases and best practices.

I realize that logging values once a second indefinitely is going to create millions of records very quickly and would be difficult for the Pi to query. In theory I will be capturing reports monthly. So if I were to setup a retention policy of 3-6 months, (just in case I mess up something on the reports and need to back track) records that are older than this would be deleted and free up space? Would this be a reasonable approach?

I know another route would be data aggregation but as the sensors could see quick small spikes that I would want to see, wouldn’t aggregation “smooth” these out?

I appreciate any advice on best practices for this type of logging. In the past the amount of records I’m dealing with have been much lower, so this will be a good learning opportunity for me.