Should the data that exists inside the Redis reboot be gone?

Source: Internet
Author: User
Should the data that exists inside the Redis reboot be gone?

Reply content:

Should the data that exists inside the Redis reboot be gone?

The Redis default setting turns on RDB persistence.
There is another persistent AOF, both of which can be turned on at the same time.
Even if persistence is turned on, it does not mean that your data will be consistent after a reboot and before it restarts. Because Redis is not likely to write the hard drive every time it writes memory (if so, the performance will be poor), depending on the rules inside your profile, the RDB can be triggered to write to the hard disk, and the part that is not written before (triggering the write) is lost.
For more information, see the official Redis Documentation: Http://redis.io/topics/persistence

The data in memory will of course be discarded, but you can save the data to a file

If persistence is not enabled, the data in Redis will be lost. Two persistence methods can also be lost, it is recommended to use the cluster mode, respectively, using RDB and aof for persistence and high availability

Redis opens the snapshot by default, and all data is saved to disk when you exit Redis.

This kind of operating system hibernation function, in hibernation, the system will write the data in the memory to a file in the hard disk, and so on recovery from the file read data back into memory.
The same is true for Redis, but it may be possible to lose data in some unforeseen circumstances.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.