Redis Source Code Analysis (v): The persistence of Redis

Source: Internet
Author: User

Redis is often called an in-memory database because it keeps all the data in memory so that it can continue to be used after the server restarts, and Redis provides two persistence modes for RDB and AOF, respectively.

At Redis runtime, the RDB program saves the current in-memory db snapshot to a disk file, and when Redis restarts, the RDB program can restore the state of the database by loading the Rdb file.

The most core of the RDB functionality is the Rdbsave and rdbload two functions, which are used to generate an RDB file to disk, while the latter is used to reload the data in the Rdb file into memory:

AOF Records all commands (and their parameters) that have been written to the database in the form of protocol text to the AOF file to achieve the purpose of logging the database state.




Redis Source Code Analysis (v): The persistence of Redis

Related Article

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.