生產環境下Redis主備配置(持久化)

來源:互聯網
上載者:User

標籤:生產環境下redis主備配置(持久化)

#1.wget #tar zxvf redis-2.8.19.tar.gz#cd redis-2.8.19/src/#vi MakefilePREFIX?=/opt/etc/redis#make && make install#redis_6309.confdaemonize yespidfile /var/run/redis_6309.pidport 6309tcp-backlog 10240timeout 600tcp-keepalive 60loglevel noticelogfile stdoutlogfile /data/log/redis/redis_6309.logdatabases 16save 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /data/redis/redis_6309/slave-serve-stale-data yesslave-read-only yesrepl-disable-tcp-nodelay noslave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly noappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10#/opt/etc/redis/bin/redis-server /opt/etc/redis/conf/redis_6309.conf#SLAVE 配置daemonize yespidfile /var/run/redis_6309.pidport 6309tcp-backlog 10240timeout 600tcp-keepalive 60loglevel noticelogfile stdoutlogfile /data/log/redis/redis_6309.logdatabases 16save 900 1save 300 10save 60 10000stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /data/redis/redis_6309/slave-serve-stale-data yesslave-read-only yesrepl-disable-tcp-nodelay noslaveof 10.0.20.14 6309slave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly noappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10二,redis master 非持久化,備持久化2.1 master #redis 6309daemonize yespidfile /var/run/redis.pidport 6309tcp-backlog 10240timeout 0tcp-keepalive 0loglevel noticelogfile stdoutlogfile /var/log/redis/redis_6309.logdatabases 16#save 900 1#save 300 10#save 60 10000save ""stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /var/lib/redis_6309/slave-serve-stale-data yesslave-read-only yesrepl-disable-tcp-nodelay noslave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly yesappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10#redis 6310more redis_6310.confdaemonize yespidfile /var/run/redis_6310.pidport 6310tcp-backlog 10240timeout 0tcp-keepalive 0loglevel noticelogfile stdoutlogfile /var/log/redis/redis_6310.logdatabases 16#save 900 1#save 300 10#save 60 10000save ""stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /var/lib/redis_6310/slave-serve-stale-data yesslave-read-only yesrepl-disable-tcp-nodelay noslave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly yesappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 102.2 salve #redis 6309daemonize yespidfile /var/run/redis.pidport 6309tcp-backlog 10240timeout 0tcp-keepalive 0loglevel noticelogfile stdoutlogfile /data/redis/logs/redis_6309.logdatabases 16save 900 1save 300 10save 60 10000save ""stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /data/redis/6309/redis_6309/slave-serve-stale-data yesslave-read-only yesslaveof 10.0.20.179 6309repl-disable-tcp-nodelay noslave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly noappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10#redis_6310more redis_6310.confdaemonize yespidfile /var/run/redis_6310.pidport 6310tcp-backlog 10240timeout 0tcp-keepalive 0loglevel noticelogfile stdoutlogfile /data/redis/logs/redis_6310.logdatabases 16save 900 1save 300 10save 60 10000save ""stop-writes-on-bgsave-error yesrdbcompression yesrdbchecksum yesdbfilename dump.rdbdir /data/redis/6310/redis_6310/slave-serve-stale-data yesslave-read-only yesslaveof 10.0.20.179 6310repl-disable-tcp-nodelay noslave-priority 100maxmemory 4gbmaxmemory-policy allkeys-lruappendonly noappendfsync everysecno-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mblua-time-limit 5000slowlog-log-slower-than 10000slowlog-max-len 128hash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10


生產環境下Redis主備配置(持久化)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.