標籤:
#包含通用配置
include /etc/redis/redis-common.conf
#監聽tcp連接埠
port 16380
#最大可用記憶體
maxmemory 100m
#記憶體耗盡時採用的淘汰策略:
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don‘t expire at all, just return an error on write operations
maxmemory-policy allkeys-lru
#aof隱藏檔
appendfilename "appendonly-16380.aof"
#rdb檔案,只用於動態添加slave過程
dbfilename dump-16380.rdb
#cluster設定檔(啟動自動產生)
cluster-config-file nodes-16380.conf
#部署在同一機器的redis執行個體,把auto-aof-rewrite搓開,防止瞬間fork所有redis進程做rewrite,佔用大量記憶體
auto-aof-rewrite-percentage 80-100
==========================================================================
#包含通用配置
include /etc/redis/redis-common.conf
#監聽tcp連接埠
port 16381
#最大可用記憶體
maxmemory 100m
#記憶體耗盡時採用的淘汰策略:
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don‘t expire at all, just return an error on write operations
maxmemory-policy allkeys-lru
#aof隱藏檔
appendfilename "appendonly-16381.aof"
#rdb檔案,只用於動態添加slave過程
dbfilename dump-16381.rdb
#cluster設定檔(啟動自動產生)
cluster-config-file nodes-16381.conf
#部署在同一機器的redis執行個體,把auto-aof-rewrite搓開,防止瞬間fork所有redis進程做rewrite,佔用大量記憶體
auto-aof-rewrite-percentage 60-80
環境安裝備忘錄 Redis redis-slave-連接埠號碼.conf