Persistent Rdb and aof for Redis

Source: Internet
Author: User

1. Rdb

When the condition is met, Redis will fork (create) A new thread, the data in memory will be written to a temporary file, the persistence process is finished, and then replace the last persisted file with this temporary file, the whole process, the main process does not do any IO operation, Ensures very high performance, at which time the master process can read and write operations. The disadvantage of RDB data persistence is that the last persisted data may be lost, and when the machine goes down or fails at the last persisted time intercept, the last data is not persisted.

The role of Fork:fork is to replicate a process that is the same as the current process, and all data (variables, environment variables, program counters, etc.) of the new process is consistent with the original process, but is a completely new process, also known as the subprocess of the original process.

If the amount of data in memory is very large, the RDB persisted temporary files will be very large, almost 1 time times the original file, performance has been reduced.

If the write operation is to be persisted immediately, the command can be executed: Save

Save is fully blocked and Bgsave is asynchronous.

Flushall also generates DUMP.RDB files, empties all database data, and saves them in the Dump.rdb file.

Shutdown also produces Dump.rdb files that store in-memory data in the Dump.rdb file

Persistent Rdb and aof for 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.