The persistence of Redis--rdb

Source: Internet
Author: User

Redis provides an RDB persistence mechanism that writes a snapshot of an in-memory dataset to disk within a specified time interval.

Advantages of the RDB:

1, in this way, backup Redis database only one file, once the system has a catastrophic failure, can be very easy to recover.

2, you can easily transfer a compressed backup file to other secure storage media.

3, maximize performance, start the persistence, just fork out a sub-process, then the child process to complete these persistent work, can greatly avoid the service process to perform IO operations.

4. When the data set is large, the start-up efficiency is high.

Disadvantages of the RDB:

1, can cause the loss of data, because the system once the time to persist before the outage, there is no time to write to the disk data will be lost.

2, the RDB is through the fork process to help complete the database persistence, if the data set is large, it may cause the server to stop the service for hundreds of milliseconds, or even 1 seconds.


The redis.conf configuration items that require changes to the RDB persistence mechanism are as follows:

1. Conditions for triggering an RDB:

2, configuration Whether compression Yes is compressed, no does not compress


3. File name of output Snapshot file:

4. Output Snapshot file directory:


5, Redis security,requirepass set up Redis requires a password, such as redis-cli shutdown I need a password .


6. Configure the maximum number of connections for Redis


7, record the execution time more than 10000 microseconds command







The persistence of Redis--rdb

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.