Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

BGSAVE in Redis

How does the BGSAVE configuration work in Redis?

If the config file has he following line:

save 60 1000 

Does this mean the snapshot will be saved every 60 seconds?
Or does it mean snapshot will be saved after ever 1000 writes?
Or can it be either?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

In a book at I am reading, it says:
Redis will automatically trigger a BGSAVE operation if 1,000 writes have occurred within 60
seconds since the last successful save has started.

But what if 1000 writes did not occur in 60 seconds? Does it mean the snapshot will not be taken?

>Solution :

If you look at the config file for Redis from the source code you’ll see that it says that the consideration is an AND, so if it’s been more than 60 seconds AND more than 1000 writes have hit redis, only then will it create a backup. This is also explained in the persistence docs as well.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading