<?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: Sticky load balance with Apache HTTPD 2.2</title>
	<atom:link href="http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/</link>
	<description>Consulting/Development in Java, Objective-C for web based systems and iPhone</description>
	<lastBuildDate>Wed, 14 Jul 2010 20:54:16 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-2772</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 05 Jan 2010 15:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-2772</guid>
		<description>Ah, they have added an example to the Apache 2.3 documentation. Nice!</description>
		<content:encoded><![CDATA[<p>Ah, they have added an example to the Apache 2.3 documentation. Nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh M</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-2763</link>
		<dc:creator>Ramesh M</dc:creator>
		<pubDate>Tue, 05 Jan 2010 09:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-2763</guid>
		<description>Sorry, I missed out the link, here it is. Actually this is apache 2.3

http://httpd.apache.org/docs/2.3/mod/mod_proxy_balancer.html

Regards,
Ramesh M</description>
		<content:encoded><![CDATA[<p>Sorry, I missed out the link, here it is. Actually this is apache 2.3</p>
<p><a href="http://httpd.apache.org/docs/2.3/mod/mod_proxy_balancer.html" rel="nofollow">http://httpd.apache.org/docs/2.3/mod/mod_proxy_balancer.html</a></p>
<p>Regards,<br />
Ramesh M</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramesh M</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-2760</link>
		<dc:creator>Ramesh M</dc:creator>
		<pubDate>Tue, 05 Jan 2010 06:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-2760</guid>
		<description>Would this be of any help for the syntax?
Thanks,
Ramesh M</description>
		<content:encoded><![CDATA[<p>Would this be of any help for the syntax?<br />
Thanks,<br />
Ramesh M</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alopez</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-2354</link>
		<dc:creator>alopez</dc:creator>
		<pubDate>Wed, 09 Dec 2009 21:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-2354</guid>
		<description>Can you easily make Cookies created on from the apache load balancer expire, say 5 minutes into the future?
mod_rewrite appears to create Cookies that can expire in 5 minutes but can it utilize the environment variables you are using, e.g. BALANCER_WORKER_ROUTE?
There are times where Cookies with a short life span can be advantageous.</description>
		<content:encoded><![CDATA[<p>Can you easily make Cookies created on from the apache load balancer expire, say 5 minutes into the future?<br />
mod_rewrite appears to create Cookies that can expire in 5 minutes but can it utilize the environment variables you are using, e.g. BALANCER_WORKER_ROUTE?<br />
There are times where Cookies with a short life span can be advantageous.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-1898</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 06 Nov 2009 09:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-1898</guid>
		<description>Hi Igor,

If a backend server is down Apache proxy balancer will set BALANCER_ROUTE_CHANGED to a new server and the user will get a new BALANCEID-cookie.

/Jakob</description>
		<content:encoded><![CDATA[<p>Hi Igor,</p>
<p>If a backend server is down Apache proxy balancer will set BALANCER_ROUTE_CHANGED to a new server and the user will get a new BALANCEID-cookie.</p>
<p>/Jakob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: igor</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-1896</link>
		<dc:creator>igor</dc:creator>
		<pubDate>Fri, 06 Nov 2009 01:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-1896</guid>
		<description>Nice but I have one question: what will happen with the sticky sessions in case of backend server failure? Let&#039;s say the apache receives a request with a cookie for server1 but the server1 is down? Will it continue sending the requests to the dead server because of the sticky session?


Thanks,
Igor</description>
		<content:encoded><![CDATA[<p>Nice but I have one question: what will happen with the sticky sessions in case of backend server failure? Let&#8217;s say the apache receives a request with a cookie for server1 but the server1 is down? Will it continue sending the requests to the dead server because of the sticky session?</p>
<p>Thanks,<br />
Igor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-662</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 23 Jul 2009 06:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-662</guid>
		<description>No at all.
Spread the word and keep a link to the original post.</description>
		<content:encoded><![CDATA[<p>No at all.<br />
Spread the word and keep a link to the original post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joao cosme jr</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-658</link>
		<dc:creator>joao cosme jr</dc:creator>
		<pubDate>Wed, 22 Jul 2009 17:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-658</guid>
		<description>Simple GREAT!!!
would you mind if   i translate your post to PT_BR??</description>
		<content:encoded><![CDATA[<p>Simple GREAT!!!<br />
would you mind if   i translate your post to PT_BR??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-303</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 20 Mar 2009 22:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-303</guid>
		<description>No. I don&#039;t think so.

I believe you are referring to the &quot;hej.&quot;-part. Take a look at mod_proxy (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass) documentation and you will see that the route-directive is &quot;Route of the worker when used inside load balancer. The route is a value appended to session id.&quot;.

Take for instance a JSESSIONID-cookie for a tomcat. It usually look something like this JSESSIONID=42345234jfrfj4343.instance1, where the first part is the actual sessionid and the second part is the jvmroute set in server.xml.
If you would use a tomcat you could just update the jvmroute in server.xml (in this example to server1, server2 and server3) for your servers and then change stickysession to JSESSIONID. No set header part needed at all.

But sometimes you do not have good routing field set for each server or you are just lazy and want the proxy handle it. 
The httpd will elect one server based on the loadbalancing algorithm (default is byrequest) and set this value to the BALANCER_WORKER_ROUTE environment variable. If there is no cookie set (or a failure occurs) BALANCER_ROUTE_CHANGED will be 1 and write header SetCookie BALANCEID=hej.server1; path=/;. Next time when the same user arrives BALANCEID cookie is set and routed to server1.

I hope my explanation was understandable. :-)

Jakob</description>
		<content:encoded><![CDATA[<p>No. I don&#8217;t think so.</p>
<p>I believe you are referring to the &#8220;hej.&#8221;-part. Take a look at mod_proxy (<a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass" rel="nofollow">http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass</a>) documentation and you will see that the route-directive is &#8220;Route of the worker when used inside load balancer. The route is a value appended to session id.&#8221;.</p>
<p>Take for instance a JSESSIONID-cookie for a tomcat. It usually look something like this JSESSIONID=42345234jfrfj4343.instance1, where the first part is the actual sessionid and the second part is the jvmroute set in server.xml.<br />
If you would use a tomcat you could just update the jvmroute in server.xml (in this example to server1, server2 and server3) for your servers and then change stickysession to JSESSIONID. No set header part needed at all.</p>
<p>But sometimes you do not have good routing field set for each server or you are just lazy and want the proxy handle it.<br />
The httpd will elect one server based on the loadbalancing algorithm (default is byrequest) and set this value to the BALANCER_WORKER_ROUTE environment variable. If there is no cookie set (or a failure occurs) BALANCER_ROUTE_CHANGED will be 1 and write header SetCookie BALANCEID=hej.server1; path=/;. Next time when the same user arrives BALANCEID cookie is set and routed to server1.</p>
<p>I hope my explanation was understandable. <img src='http://www.jakeri.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Jakob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/comment-page-1/#comment-302</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 20 Mar 2009 19:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakeri.net/?p=62#comment-302</guid>
		<description>Is there a typo in your post? You are setting the value for the cookie to: 

BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e

But your routes are specified as:

route=server1
route=server2
route=server3

And your stickiness is specified as the value of the cookie which won&#039;t match the route values:

stickysession=BALANCEID

Mark</description>
		<content:encoded><![CDATA[<p>Is there a typo in your post? You are setting the value for the cookie to: </p>
<p>BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e</p>
<p>But your routes are specified as:</p>
<p>route=server1<br />
route=server2<br />
route=server3</p>
<p>And your stickiness is specified as the value of the cookie which won&#8217;t match the route values:</p>
<p>stickysession=BALANCEID</p>
<p>Mark</p>
]]></content:encoded>
	</item>
</channel>
</rss>
