Home > Database > Redis > There are several ways to persist redis

There are several ways to persist redis

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-27 15:28:06
forward
1290 people have browsed it

How many ways are there to persist redis?

Answer: There are two main ways:

1) Snapshot persistence

has been automatically enabled in the redis configuration file,

The format is: save N M

means that if redis is modified at least M times within N seconds, redis will take a snapshot to the disk.

Of course we can also manually execute the save or bgsave (asynchronous) command to make a snapshot

2) append only file AOF persistence

There are three modes in total, such as

appendfsync The default of everysec is to force writing to disk once per second

appendfsync always Force writing to disk every time a write operation is performed

appendfsync no completely depends on OS and performance The best but persistence cannot be guaranteed

The third mode is the best. Redis also adopts the third mode by default.

The above is the detailed content of There are several ways to persist redis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Issues
php redis connection problem
From 1970-01-01 08:00:00
0
0
0
About a small error in the redis manual
From 1970-01-01 08:00:00
0
0
0
python2.7 - django cannot connect to redis
From 1970-01-01 08:00:00
0
0
0
I can't connect to redis using php
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template