One: Redis persistent configuration
Redis persistence in 2 ways [snapshot, log] II: Configuration options for RDB snapshots Save900 1//900, 1 writes, resulting in a snapshotSave 300 1000//If there are 1000 writes in 300 seconds, a snapshot is generatedSave 60 10000//If there are 10,000 writes in 60 seconds, a snapshot is generated(These 3 options are masked,the RDB is disabled)
Three: redis.conf the meaning of the parameter in the configuration file stop-writes-on-bgsave-error Yes//when the background backup process fails, does the main process stop writing?Rdbcompression Yes//whether the exported Rdb file is compressedRdbchecksum Yes//to verify the integrity of the RDB when importing RBD recovery dataDbfilename Dump.rdb//the Rdb file name that is being directed outdir.///placement path for an RDB
IV: Advantages and disadvantages of RDB
Advantages: Fast Speed
Cons: Easy data loss
Five: Test Write
./bin/redis-benchmark-n 10000
The Rdb snapshot persistence of one-to-one Redis