<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; 1.Application</title>
	<atom:link href="http://www.linuxany.com/archives/category/application/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Nginx concat模块减轻http请求连接数</title>
		<link>http://www.linuxany.com/archives/1937.html</link>
		<comments>http://www.linuxany.com/archives/1937.html#comments</comments>
		<pubDate>Tue, 20 Dec 2011 06:01:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[concat]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1937</guid>
		<description><![CDATA[nginx_concat_module是淘宝开发的基于Nginx减少HTTP请求数量的扩展模块,主要是用于合并减少前段用户Request的HTTP请求的数量。 taobao.com使用concat_module 进行css样式合并 安装： 可以从这里 checkout 最新的代码， svn checkout http://code.taobao.org/svn/nginx_concat_module/trunk/ $NGINX_CONCAT_MODULE 然后下载适合你自己版本的 nginx 源码包，在 ./configure 中增加参数 &#8211;add-module=$NGINX_CONCAT_MODULE cd /us/local/src wget http://nginx.org/download/nginx-1.0.10.tar.gz tar xzvf nginx-1.0.10.tar.gz cd nginx-1.0.10/ ./configure --user=www --group=www&#160; \ --prefix=/usr/local/nginx \ --with-http_stub_status_module&#160; \ --with-http_sub_module&#160; &#160; \ --with-http_flv_module&#160; &#160;\ --with-http_gzip_static_module&#160; &#160;\ --add-module=../nginx_concat_module/&#160; make &#38;&#38; make install 使用方法： location /temp/ { &#160;&#160; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1937.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 让浏览器告诉你负载均衡分到了哪台服务器</title>
		<link>http://www.linuxany.com/archives/1902.html</link>
		<comments>http://www.linuxany.com/archives/1902.html#comments</comments>
		<pubDate>Fri, 02 Dec 2011 08:46:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1902</guid>
		<description><![CDATA[在大型网站的架构中，通常需要多台web服务器同时为用户服务，那么，如何直观地了解代理将请求转向了哪台机器呢？ 幸运的是，我们可以通过Nginx的add_header指令配合Firefox的插件header spy相结合来实现上面提到的问题。 首先，修改nginx的配置 然后安装Firefox的插件，并增加一个监测项： 用FF打开，可以在浏览器状态栏看到： 这样就可以很清楚地知道程序当前运行在哪台web服务器上。若Web服务器是Apache，也可以实现。 Nginx的add_header指令介绍 http://wiki.nginx.org/HttpHeadersModule 您还可能感兴趣的内容利用telnet取http头信息Nginx concat模块减轻http请求连接数CSS 清除页面中多余的样式负载均衡软件比较(HA/LVS/Nginx)Nginx 支持PATH_INFO]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1902.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>负载均衡软件比较(HA/LVS/Nginx)</title>
		<link>http://www.linuxany.com/archives/1857.html</link>
		<comments>http://www.linuxany.com/archives/1857.html#comments</comments>
		<pubDate>Wed, 09 Nov 2011 04:27:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lvs/Ha]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Performents]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[lvs]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1857</guid>
		<description><![CDATA[Nginx的优点: 性能好，可以负载超过1万的并发 功能多，除了负载均衡，还能作Web服务器，而且可以通过Geo模块来实现流量分配 社区活跃，第三方补丁和模块很多 支持gzip proxy 缺点: 不支持session保持 对后端realserver的健康检查功能效果不好。而且只支持通过端口来检测，不支持通过url来检测 nginx对big request header的支持不是很好，如果client_header_buffer_size设置的比较小，就会返回400bad request页面。 Haproxy的优点: 它的优点正好可以补充nginx的缺点。支持session保持，同时支持通过获取指定的url来检测后端服务器的状态。 支持tcp模式的负载均衡。比如可以给mysql的从服务器集群和邮件服务器做负载均衡。 缺点： 不支持虚拟主机(这个很傻啊) 目前没有nagios和cacti的性能监控模板 LVS的优点: 性能好，接近硬件设备的网络吞吐和连接负载能力。 LVS的DR模式，支持通过广域网进行负载均衡。这个其他任何负载均衡软件目前都不具备。 缺点： 比较重型。另外社区不如nginx活跃。 您还可能感兴趣的内容Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian EtchNginx 让浏览器告诉你负载均衡分到了哪台服务器Nginx 支持PATH_INFONginx 502 Bad Gateway错误及解决方案收集Apache 记录代理后的用户来源ip]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1857.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 支持PATH_INFO</title>
		<link>http://www.linuxany.com/archives/1854.html</link>
		<comments>http://www.linuxany.com/archives/1854.html#comments</comments>
		<pubDate>Tue, 08 Nov 2011 15:15:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[path_info]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1854</guid>
		<description><![CDATA[在nginx上的站点添加如下内容： ###################################################################### location ~ \.php { &#160;&#160; &#160; &#160; &#160;fastcgi_index index.php; &#160;&#160; &#160; &#160; &#160;fastcgi_pass 127.0.0.1:9000; &#160;&#160; &#160; &#160; &#160;include fcgi.conf; &#160;&#160; &#160; &#160; &#160;set $path_info &#34;&#34;; &#160;&#160; &#160; &#160; &#160;set $real_script_name $fastcgi_script_name; &#160;&#160; &#160; &#160; &#160;if ($fastcgi_script_name ~ &#34;^(.+?\.php)(/.+)$&#34;) { &#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;set $real_script_name $1; &#160;&#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1854.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 502 Bad Gateway错误及解决方案收集</title>
		<link>http://www.linuxany.com/archives/1636.html</link>
		<comments>http://www.linuxany.com/archives/1636.html#comments</comments>
		<pubDate>Sun, 28 Aug 2011 16:42:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[502]]></category>
		<category><![CDATA[Bad Gateway]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1636</guid>
		<description><![CDATA[1.FastCGI worker进程数是否不够 通过命令查看服务器上一共开了多少的 php-cgi 进程 ps -fe &#124;grep &#34;php&#34; &#124; grep -v &#34;grep&#34; &#124; wc -l 使用如下命令查看已经有多少个php-cgi进程用来处理tcp请求 netstat -anop &#124; grep &#34;php&#34; &#124; grep -v &#34;grep&#34; &#124; wc -l 接近配置文件中设置的数值，表明worker进程数设置太少 2.FastCGI执行时间过长 根据实际情况调高以下参数值 fastcgi_connect_timeout 300;fastcgi_send_timeout 300;fastcgi_read_timeout 300; 3.FastCGI Buffer不够 nginx和apache一样，有前端缓冲限制，可以调整缓冲参数 fastcgi_buffer_size 32k;fastcgi_buffers 8 32k; 这个一般你能在日志中看到：upstream sent too big header while reading response header from upstream 意思就是反馈回来的头部信息太大，好多是Firefox浏览时才出现，是它的插件引起的。 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1636.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 记录代理后的用户来源ip</title>
		<link>http://www.linuxany.com/archives/1613.html</link>
		<comments>http://www.linuxany.com/archives/1613.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 15:29:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1613</guid>
		<description><![CDATA[前端nginx代理设置： proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 后端apache设置： LogFormat &#34;%{X-Forwarded-For}i %l %u %t \&#34;%r\&#34; %&#62;s %b \&#34;%{Referer}i\&#34;\&#34;%{User-Agent}i\&#34;&#34; common 就可以接收到源ip了。 您还可能感兴趣的内容Nginx 让浏览器告诉你负载均衡分到了哪台服务器负载均衡软件比较(HA/LVS/Nginx)Nginx 支持PATH_INFONginx 502 Bad Gateway错误及解决方案收集Nginx 性能优化（突破十万并发）]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1613.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 性能优化（突破十万并发）</title>
		<link>http://www.linuxany.com/archives/1601.html</link>
		<comments>http://www.linuxany.com/archives/1601.html#comments</comments>
		<pubDate>Sun, 31 Jul 2011 08:12:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1601</guid>
		<description><![CDATA[nginx配置文件常用优化： worker_processes 8; nginx进程数，建议按照cpu数目来指定，一般为它的倍数。 worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; 为每个进程分配cpu，上例中将8个进程分配到8个cpu，当然可以写多个，或者将一个进程分配到多个cpu。 worker_rlimit_nofile 102400; 这个指令是指当一个nginx进程打开的最多文件描述符数目，理论值应该是最多打开文件数（ulimit -n）与nginx进程数相除，但是nginx分配请求并不是那么均匀，所以最好与ulimit -n的值保持一致。 use epoll; 使用epoll的I/O模型，这个不用说了吧。 worker_connections 102400; 每个进程允许的最多连接数，理论上每台nginx服务器的最大连接数为worker_processes*worker_connections。 keepalive_timeout 60; keepalive超时时间。 client_header_buffer_size 4k; 客户端请求头部的缓冲区大小，这个可以根据你的系统分页大小来设置，一般一个请求的头部大小不会超过1k，不过由于一般系统分页都要大于1k，所以这里设置为分页大小。分页大小可以用命令getconf PAGESIZE取得。 open_file_cache max=102400 inactive=20s; 这个将为打开文件指定缓存，默认是没有启用的，max指定缓存数量，建议和打开文件数一致，inactive是指经过多长时间文件没被请求后删除缓存。 open_file_cache_valid 30s; 这个是指多长时间检查一次缓存的有效信息。 open_file_cache_min_uses 1; open_file_cache指令中的inactive参数时间内文件的最少使用次数，如果超过这个数字，文件描述符一直是在缓存中打开的，如上例，如果有一个文件在inactive时间内一次没被使用，它将被移除。 关于内核参数的优化： net.ipv4.tcp_max_tw_buckets = 6000 timewait的数量，默认是180000。 net.ipv4.ip_local_port_range = 1024 65000 允许系统打开的端口范围。 net.ipv4.tcp_tw_recycle = 1 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1601.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

