redis 配置文件aof配置


redis 配置文件aof配置:

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM