<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[nginx支持redis，实现替换nginx+memcache方式]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Thu, 04 Feb 2016 09:18:39 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：Nginx直接连接redis，不用php的扩展连接，一定程序上提高了redis性能，但是在程序逻辑的可控制上会弱一点，用来做一些单纯的高并发登录没有问题，逻辑重点这种玩法并不能带来很大的提升。<br/>需要下载第三方模块ngx_http_redis-0.3.2.tar.gz，并需要重新编译nginx。<br/>注意要注释掉ngx_http_redis_module.c文件的145行<br/>/*static ngx_str_t&nbsp;&nbsp;ngx_http_redis_db&nbsp;&nbsp;= ngx_string(&quot;redis_db&quot;);*/<br/>否则会报错，意思是这个定义的redis_db在程序里没有使用，算是个警告报错，注释掉安装即可<br/><br/>./configure --user=nginx --group=nginx&nbsp;&nbsp;--prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/software/module/ngx_http_redis-0.3.2<br/><br/><br/>配置<br/>location / &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;set $redis_key $uri;<br/> <br/>&nbsp;&nbsp;&nbsp;&nbsp;redis_pass&nbsp;&nbsp;&nbsp;&nbsp; name:6379;<br/>&nbsp;&nbsp;&nbsp;&nbsp;default_type&nbsp;&nbsp; text/html;<br/>&nbsp;&nbsp;&nbsp;&nbsp;error_page&nbsp;&nbsp;&nbsp;&nbsp; 404 = /fallback;<br/>&nbsp;&nbsp;&#125;<br/><br/>$redis_db<br/>The number of redis database (required for &lt; 0.3.2).<br/>For ngx_http_redis &gt;= 0.3.2 is not obligatory, default value is &quot;0&quot; if not defined.<br/>这个$redis_db可以不配，默认是0database。<br/>更多官方的资料请参考：http://wiki.nginx.org/HttpRedis2Module<br/><br/>更多参考之Keepalived+nginx+redis主从+tomcat一机多实例实现会话共享：<br/>http://lovelace.blog.51cto.com/1028430/1550198<br/>https://www.nginx.com/resources/wiki/modules/redis2/<br/>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] nginx支持redis，实现替换nginx+memcache方式]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>