Home Backend Development PHP Tutorial Two persistence methods of redis - rdb snapshot and aof log

Two persistence methods of redis - rdb snapshot and aof log

Apr 23, 2019 am 10:20 AM
redis

This article mainly talks about the two persistence methods of redis, namely rdb snapshot and aof log. It has certain learning value and interested friends can take a look.

Persistence means that the data that needs to be stored will not be lost even if the power is cut off/restarted, that is, the data is stored in the device, usually in the hard disk.

There are two ways to persist redis:

1-rdb snapshot

2-aof log, which can be configured by configuring the redis.conf file

Configuration options of rdb snapshot:

After the configuration is completed, restart redis to take effect. There is a drawback to using rdb persistence. If there are exactly 10 write operations when it is about to reach 300 seconds, a snapshot will be generated at this time. The snapshot is generated After the completion, there was a new write operation, and the power was cut off at this time.

After the call came in, redis was started to automatically import the rdb file. The data only had the data before the snapshot was generated, and part of the data after that was lost. So use Arrived at aof log persistence:

Related tutorials: Redis video tutorial

The above is the detailed content of Two persistence methods of redis - rdb snapshot and aof log. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 May 08, 2024 pm 03:50 PM

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100

How to change the password in redis How to change the password in redis Apr 20, 2024 am 03:00 AM

How to change the password in redis

Analyze PHP function bottlenecks and improve execution efficiency Analyze PHP function bottlenecks and improve execution efficiency Apr 23, 2024 pm 03:42 PM

Analyze PHP function bottlenecks and improve execution efficiency

Is redis a memory cache? Is redis a memory cache? Apr 20, 2024 am 05:26 AM

Is redis a memory cache?

Golang API caching strategy and optimization Golang API caching strategy and optimization May 07, 2024 pm 02:12 PM

Golang API caching strategy and optimization

Is redis a non-relational database? Is redis a non-relational database? Apr 20, 2024 am 05:36 AM

Is redis a non-relational database?

Caching mechanism and application practice in PHP development Caching mechanism and application practice in PHP development May 09, 2024 pm 01:30 PM

Caching mechanism and application practice in PHP development

Which one has better performance, erlang or golang? Which one has better performance, erlang or golang? Apr 21, 2024 am 03:24 AM

Which one has better performance, erlang or golang?

See all articles