<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Re: Strange HTTP header?</title>
	<atom:link href="http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/feed/" rel="self" type="application/rss+xml" />
	<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:14:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9445</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Tue, 26 Aug 2008 09:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9445</guid>
		<description>@Sikachu: yes, each Passenger instance will use about 33% less memory. Of course now you&#039;ll have to deal with twice the memory overhead of Apache, but that can be minimized to only several MB if you tweak things properly.

Another thing to be aware of is that the two Passenger instances won&#039;t be able to share framework code with each other. Suppose that your 4 applications use the following Rails frameworks:
App 1: Rails 1.2.6  -- allocated to Passenger instance A
App 2: Rails 1.2.6 -- allocated to Passenger instance B
App 3: Rails 2.0.2 -- allocated to Passenger instance A
App 4: Rails 2.1.0 -- allocated to Passenger instance B

Although app 1 and app 2 use the same Rails framework, they won&#039;t be able to share the framework memory with each other because they&#039;re running on different Passenger instances.

But if your Apache&#039;s only job is to use serve Passenger-powered applications, then you don&#039;t need to sandbox is to an unprivileged user. Passenger supports privilege lowering out-of-the-box. In that case I&#039;d just run Apache as root so that Passenger can lower the privilege of a Rails application to its corresponding owner.</description>
		<content:encoded><![CDATA[<p>@Sikachu: yes, each Passenger instance will use about 33% less memory. Of course now you&#8217;ll have to deal with twice the memory overhead of Apache, but that can be minimized to only several MB if you tweak things properly.</p>
<p>Another thing to be aware of is that the two Passenger instances won&#8217;t be able to share framework code with each other. Suppose that your 4 applications use the following Rails frameworks:<br />
App 1: Rails 1.2.6  &#8212; allocated to Passenger instance A<br />
App 2: Rails 1.2.6 &#8212; allocated to Passenger instance B<br />
App 3: Rails 2.0.2 &#8212; allocated to Passenger instance A<br />
App 4: Rails 2.1.0 &#8212; allocated to Passenger instance B</p>
<p>Although app 1 and app 2 use the same Rails framework, they won&#8217;t be able to share the framework memory with each other because they&#8217;re running on different Passenger instances.</p>
<p>But if your Apache&#8217;s only job is to use serve Passenger-powered applications, then you don&#8217;t need to sandbox is to an unprivileged user. Passenger supports privilege lowering out-of-the-box. In that case I&#8217;d just run Apache as root so that Passenger can lower the privilege of a Rails application to its corresponding owner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sikachu!</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9444</link>
		<dc:creator>Sikachu!</dc:creator>
		<pubDate>Tue, 26 Aug 2008 06:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9444</guid>
		<description>OK, here is the question that I got from this method.
If I use separate Apache installation for each user, then I use passenger with Ruby Enterprise Edition.
So, if I give each user 2 maximum passenger instances, will the memory usage be decreased in the same percentage as using only 1 Apache with 4 maximum instances?

:)</description>
		<content:encoded><![CDATA[<p>OK, here is the question that I got from this method.<br />
If I use separate Apache installation for each user, then I use passenger with Ruby Enterprise Edition.<br />
So, if I give each user 2 maximum passenger instances, will the memory usage be decreased in the same percentage as using only 1 Apache with 4 maximum instances?</p>
<p> <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nome do Jogo &#187; Blog Archive &#187; Rails Podcast Brasil - Episódio 29</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9443</link>
		<dc:creator>Nome do Jogo &#187; Blog Archive &#187; Rails Podcast Brasil - Episódio 29</dc:creator>
		<pubDate>Tue, 26 Aug 2008 05:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9443</guid>
		<description>[...] Re: Strange HTTP header? [...]</description>
		<content:encoded><![CDATA[<p>[...] Re: Strange HTTP header? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Wong</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9442</link>
		<dc:creator>Eric Wong</dc:creator>
		<pubDate>Tue, 26 Aug 2008 02:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9442</guid>
		<description>Actually, proxying most application servers behind nginx will get you a
performance /increase/ in real-world usage.

The key point to understand is:

  concurrency at the network layer != concurrency at the application layer

  Tying those two together is a common mistake I see people making
  (I don&#039;t see a lot of writings on it, either).

All HTTP clients are always &quot;slow&quot; in relation to nginx  $app_server;
especially those with slow upstreams.  Slow clients hog up $app_server
processes by making them wait on I/O (making HTTP requests, keepalive
sockets, lingering close...).

nginx fully buffers a request before sending it to $app_server; this
means $app_server spends less time (almost none) waiting on network I/O.
So despite the extra data copy; $app_server resources are better used
doing application processing.

This problem actually applies less to mongrel than it does to Apache
because mongrel does I/O to clients asynchronously and independently of
the actual application processing.  Reducing I/O time for Mongrels is
still a win because lightweight green threads are still heavier than the
accounting structures that nginx uses to manage sockets.

Apache has mpm_event which should fix things and nullify the benefits
nginx provides, but I&#039;m not sure if it ever matured to the point of
usability.  Converting an existing codebase like Apache to use events +
non-blocking I/O is a huge task and a single broken module can ruin your
day (the same way that C extensions like mysql can break Ruby threading).</description>
		<content:encoded><![CDATA[<p>Actually, proxying most application servers behind nginx will get you a<br />
performance /increase/ in real-world usage.</p>
<p>The key point to understand is:</p>
<p>  concurrency at the network layer != concurrency at the application layer</p>
<p>  Tying those two together is a common mistake I see people making<br />
  (I don&#8217;t see a lot of writings on it, either).</p>
<p>All HTTP clients are always &#8220;slow&#8221; in relation to nginx  $app_server;<br />
especially those with slow upstreams.  Slow clients hog up $app_server<br />
processes by making them wait on I/O (making HTTP requests, keepalive<br />
sockets, lingering close&#8230;).</p>
<p>nginx fully buffers a request before sending it to $app_server; this<br />
means $app_server spends less time (almost none) waiting on network I/O.<br />
So despite the extra data copy; $app_server resources are better used<br />
doing application processing.</p>
<p>This problem actually applies less to mongrel than it does to Apache<br />
because mongrel does I/O to clients asynchronously and independently of<br />
the actual application processing.  Reducing I/O time for Mongrels is<br />
still a win because lightweight green threads are still heavier than the<br />
accounting structures that nginx uses to manage sockets.</p>
<p>Apache has mpm_event which should fix things and nullify the benefits<br />
nginx provides, but I&#8217;m not sure if it ever matured to the point of<br />
usability.  Converting an existing codebase like Apache to use events +<br />
non-blocking I/O is a huge task and a single broken module can ruin your<br />
day (the same way that C extensions like mysql can break Ruby threading).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lix</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9439</link>
		<dc:creator>lix</dc:creator>
		<pubDate>Mon, 25 Aug 2008 12:30:34 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9439</guid>
		<description>Thijs Burema

and?

chmod 777 /home ... :)</description>
		<content:encoded><![CDATA[<p>Thijs Burema</p>
<p>and?</p>
<p>chmod 777 /home &#8230; <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chu Yeow</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9438</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Sun, 24 Aug 2008 12:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9438</guid>
		<description>Aww now I feel embarrassed - never thought about it in terms of shared hosting because I&#039;ve never had the need to deal with that. And I was so sure and excited too :p. But it really makes sense (now) to run Nginx on top of Apache+Passenger, since that&#039;s one of the main problems Passenger is trying to solve.</description>
		<content:encoded><![CDATA[<p>Aww now I feel embarrassed &#8211; never thought about it in terms of shared hosting because I&#8217;ve never had the need to deal with that. And I was so sure and excited too :p. But it really makes sense (now) to run Nginx on top of Apache+Passenger, since that&#8217;s one of the main problems Passenger is trying to solve.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9437</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Sun, 24 Aug 2008 08:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9437</guid>
		<description>@Matthijs Langenberg: ah you&#039;re correct. :) Too bad Nginx doesn&#039;t seem to support boolean operators, so I have to put multiple if-statements in the config file. :(

And yes, we have an automated way of setting up another Apache installation. It&#039;s a script which asks the user what his domain name is, then setup a few Apache startup scripts and an Apache config file. It&#039;s automatically assigned to a random port number.</description>
		<content:encoded><![CDATA[<p>@Matthijs Langenberg: ah you&#8217;re correct. <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Too bad Nginx doesn&#8217;t seem to support boolean operators, so I have to put multiple if-statements in the config file. <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>And yes, we have an automated way of setting up another Apache installation. It&#8217;s a script which asks the user what his domain name is, then setup a few Apache startup scripts and an Apache config file. It&#8217;s automatically assigned to a random port number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthijs Langenberg</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9436</link>
		<dc:creator>Matthijs Langenberg</dc:creator>
		<pubDate>Sun, 24 Aug 2008 08:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9436</guid>
		<description>There is a small error in your nginx configuration: a GET to an existing file will directly be served from the filesystem, but a HEAD will still be proxied to Apache.
Do you guys also have an automated way of setting up another apache installation for a new user which automatically generates the nginx vhost with the correct port number?</description>
		<content:encoded><![CDATA[<p>There is a small error in your nginx configuration: a GET to an existing file will directly be served from the filesystem, but a HEAD will still be proxied to Apache.<br />
Do you guys also have an automated way of setting up another apache installation for a new user which automatically generates the nginx vhost with the correct port number?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thijs Burema</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9429</link>
		<dc:creator>Thijs Burema</dc:creator>
		<pubDate>Sat, 23 Aug 2008 07:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9429</guid>
		<description>@lix 

is /home always by default  root : root /home/$_youruser

@toppic hax !! dude</description>
		<content:encoded><![CDATA[<p>@lix </p>
<p>is /home always by default  root : root /home/$_youruser</p>
<p>@toppic hax !! dude</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sikachu!</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/comment-page-1/#comment-9425</link>
		<dc:creator>Sikachu!</dc:creator>
		<pubDate>Fri, 22 Aug 2008 17:17:07 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/08/22/re-strange-http-header/#comment-9425</guid>
		<description>ok ok my bad then ..
probably i need to learn more :P</description>
		<content:encoded><![CDATA[<p>ok ok my bad then ..<br />
probably i need to learn more <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

