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?
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.