Snapshot saving
Hello,
I was wondering about the way you are saving the data on dump. I am aware Redis uses AOF and snapshots to dump a database to a file. I can see in your code that you use only AOF, but maybe I am missing something. How do you deal when there are large amounts of data that have to be dumped? Do you perhaps save the database as a whole in a snapshot way as Redis does?
Godis does support RDB. But it can only generate RDB through AOF rewriting
So if I get it right, the AOF/file always starts from 0 and then adds up on each change of some data? So after 10 years of append, will the file not be huge? And how about when you restart the database, does it have to start reading that huge file from beginning to end? Which for 10 years could take some time to start?
Aof rewriting will delete outdated data, and godis supports aof-use-rdb-preamble to further optimize it.
https://redis.io/docs/latest/commands/bgrewriteaof/