tanner icon indicating copy to clipboard operation
tanner copied to clipboard

Adding a feature to remove tanner-related sessions in redis-server on expiry

Open viskey98 opened this issue 6 years ago • 3 comments

Lately we have been facing a problem on the snare side (mushorg/snare#180) due to default-tanner. According to @afeena it occurred because there are lot of sessions in the redis-server database which has consumed almost the complete memory capacity. This is because of the low memory of our default tanner server (Obviously it wasn't meant for production purpose). Due to this snare sessions were unable to be processed and stored in the same.

This gave me a thought, what if we build a new feature :

  • Requires a new config parameter expiry_time to be present in tanner.config.
  • Use it to delete (tanner-created) sessions from redis-server after that 'expiry_time`.
  • And this expiry_time can be configured based on the server-admin, depending on the duration of the history of data required and depending on the memory capacity of the server.
  • The deletion can be done periodically or in a lazy fashion depending on the implementation.

This is just a thought, looking for others opinions on the same :)

viskey98 avatar Mar 01 '19 13:03 viskey98

Yeah, I think auto-deleting based on memory is kinda must as we won't do that then it will just stop working.

rnehra01 avatar Mar 01 '19 18:03 rnehra01

What period would be suitable for deletion @viskey98 @rnehra01

amanjiofficial avatar Mar 16 '19 15:03 amanjiofficial

It's good to keep the period as parameter.

rnehra01 avatar Mar 16 '19 16:03 rnehra01