Current location - Health Preservation Learning Network - Healthy weight loss - Redis sustainable mechanism ADB and AOF
Redis sustainable mechanism ADB and AOF
There are two ways: save and bgsave.

Advantages of RDB:

Disadvantages of RDB:

Low data security. If redis fails in the persistence process, it will lose the last persistent data, so this method is more suitable for the time when the data requirements are not high.

Redis cannot perform operations in the process of fock subprocess, so the interval of R DB operations must not be too short. Moreover, if the data set is large, it may cause the whole server to stop serving? Hundreds of milliseconds, even seconds.

Record every time in the form of a log? Write and delete operations, query operations will not be recorded, but recorded in the form of text, which will be added continuously. Can you open it? See the detailed operation record for details.

Three additional methods (fsync):

Advantages of AOF:

Disadvantages of AOF: