<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[Redis主从服务器配置]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Thu, 17 Oct 2019 02:20:25 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	redis作为大家经常使用到的内存级缓存服务器，我们需要保证该服务的高可用性。 这里我介绍最简单的配置方式，使用主从方式集群，并使用sentinel程序来管理主从服务器的切换。下面我们就动手来实现吧.<br/><br/>配置 redis.conf<br/><br/>配置主服务器 master<br/>master中我们除了修改需要使用的端口和绑定的ip地址为，其他的基本保留不变就可以了，当然你也可以按自己的喜欢配置其他参数<br/>配置从服务器 slave<br/>从服务器相对主服务器的配置修改成自己要的端口和绑定的ip外，还需要增加一个slaveof参数 用于指定该服务器的主服务器的ip和端口<br/>配置sentinel服务<br/>我们需要增加sentinel.conf文件配置监控服务的端口，ip地址<br/><br/> port 26379<br/>sentinel myid 4c59c281412c7198c18781846505609a7e70c7dd<br/>sentinel monitor master 127.0.0.1 7001 1<br/>sentinel down-after-milliseconds master 5000<br/>sentinel failover-timeout master 15000<br/><br/><br/>port 指定sentinel服务的端口<br/>myid用于指定该服务的id<br/>montor 主服务器别名 主服务器的ip 端口 切换主从的从服务器投票数<br/>down-after-milliseconds 主服务器别名 指定主服务器检测时间毫秒数<br/>failover-timeout 主服务器别名 切换时间数<br/>Tags - <a href="https://www.heckjj.com/tags/redis/" rel="tag">redis</a> , <a href="https://www.heckjj.com/tags/%25E4%25B8%25BB%25E4%25BB%258E%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8/" rel="tag">主从服务器</a>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] Redis主从服务器配置]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>