Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot saving #230

Open
megameganime opened this issue Oct 1, 2024 · 3 comments
Open

Snapshot saving #230

megameganime opened this issue Oct 1, 2024 · 3 comments

Comments

@megameganime
Copy link

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?

@HDT3213
Copy link
Owner

HDT3213 commented Oct 3, 2024

Godis does support RDB. But it can only generate RDB through AOF rewriting

@arberkatellari
Copy link

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?

@HDT3213
Copy link
Owner

HDT3213 commented Oct 3, 2024

Aof rewriting will delete outdated data, and godis supports aof-use-rdb-preamble to further optimize it.

https://redis.io/docs/latest/commands/bgrewriteaof/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants