This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13674|Reply: 0

[Redis] The difference between save and bgsave in redis

[Copy link]
Posted on 8/24/2017 5:04:16 PM | | |
Both the SAVE and BGSAVE commands call the rdbSave function, but they are called in different ways:
SAVE directly calls rdbSave, blocking the Redis main process until the save is complete. During the main process block,

The server cannot process any requests from the client.

BGSAVE forks out a child process that calls rdbSave and sends a signal to the main process after the save is complete, notifying the main process that the save is complete. The Redis server can still continue to process client requests while BGSAVE is running.

Persist save storage with the command:

./redis-cli -h ip -p port save
./redis-cli -h ip -p port bgsave






Previous:Redis two persistence methods and principles
Next:The difference between .net ServiceStack.Redis and StackExchange.Redis is different
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com