bind 127.0.0.1


port 6379



daemonize yes


dbfilename dump.rdb

dir /new_renpeng/redis/

logfile /new_renpeng/redis/redis-server.log


appendonly yes
appendfsync everysec
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb

appendfilename appendonly.aof
dir /new_renpeng/redis/
aof-load-truncated yes

# no-appendfsync-on-rewrite参数, 如果该参数设置为no,是最安全的方式,不会丢失数据,但是要忍受阻塞的问题。如果设置为yes呢?这就相当于将appendfsync设置为no,这说明并没有执行磁盘操作,只是写入了缓冲区,因此这样并不会造# 成阻塞(因为没有竞争磁盘),但是如果这个时候redis挂掉,就会丢失数据。丢失多少数据呢?在linux的操作系统的默认设置下,最多会丢失30s的数据。

no-appendfsync-on-rewrite no

相关文章:

  • 2021-08-14
  • 2021-09-05
猜你喜欢
  • 2021-09-08
  • 2021-08-26
  • 2021-05-22
  • 2021-07-30
  • 2021-09-11
相关资源
相似解决方案