Redis persistence-RDB and Redis persistence-RDB

Source: Internet
Author: User

Redis persistence-RDB and Redis persistence-RDB
Redis provides a RDB persistence mechanism, that is, to write data set snapshots in the memory to the disk at a specified interval.

Advantages of RDB:

1. In this way, there is only one file to back up the Redis database. Once the system encounters a catastrophic fault, it can be easily restored.

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

3. Maximize the performance. When starting persistence, you only need to fork a sub-process, and then the sub-process completes the persistence work, which can greatly prevent the service process from performing IO operations.

4. the startup efficiency is high when the dataset is large.

Disadvantages of RDB:

1. Data may be lost because once the system goes down before scheduled persistence, data that has not been written to the disk will be lost.

2. RDB uses the fork sub-process to help complete database persistence. If the dataset is large, the server may stop serving for several hundred milliseconds or even one second.


The redis. conf configuration items to be modified for the RDB persistence mechanism are as follows:

1. Conditions for triggering RDB:

2. Whether to compress the configuration. yes, yes, no, no.


3. Name of the output snapshot file:

4. Directory of the output snapshot file:


5. For Redis security, requirepass requires a password to set redis. For example, redis-cli shutdown requires a password.


6. Configure the maximum number of connections of Redis


7. Record commands that have been executed for over 10000 microseconds







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.