<?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>JAKERI &#187; loadbalancer</title>
	<atom:link href="http://www.jakeri.net/tag/loadbalancer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakeri.net</link>
	<description>Java, JEE, Objective-C, Scalability, High-Availability, e-Commerce etc...</description>
	<lastBuildDate>Tue, 26 Jul 2011 19:27:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Sticky load balance with Apache HTTPD 2.2</title>
		<link>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/</link>
		<comments>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 21:39:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[loadbalancer]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[mod_proxy_balancer]]></category>
		<category><![CDATA[sticky]]></category>

		<guid isPermaLink="false">http://www.jakeri.net/?p=62</guid>
		<description><![CDATA[Apache HTTPD 2.2 includes some interesting features for making a basic load balancer. This configuration makes a sticky loadbalancer with 3 backend servers. It is not dependant on any specific configuration of the backend server such as JSESSIONID or PHPSESSIONID. &#8230; <a href="http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Apache HTTPD 2.2 <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass">includes</a> <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember">some</a> <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#environment">interesting</a> features for making a basic load <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html">balancer</a>.</p>
<p>This configuration makes a sticky loadbalancer with 3 backend servers. It is <strong>not dependant</strong> on any specific configuration of the <strong>backend</strong> server such as JSESSIONID or PHPSESSIONID.<br />
It will create a BALANCEID-cookie with a route to a backend server.</p>
<p><code><br />
</code></p>
<pre><code>
#You need at least these modules</code></pre>
<pre><code>
#Header used for setting cookie</code></pre>
<pre><code>
LoadModule headers_module ...</code></pre>
<pre><code>
#Proxy</code></pre>
<pre><code>
LoadModule proxy_module ...</code></pre>
<pre><code>
LoadModule proxy_http_module ...</code></pre>
<pre><code>
LoadModule proxy_balancer_module ...</code></pre>
<pre>#Set a cookie if BALANCER_ROUTE_CHANGED containing BALANCER_WORKER_ROUTE environment variable
Header add Set-Cookie "BALANCEID=hej.%{BALANCER_WORKER_ROUTE}e; path=/;" env=BALANCER_ROUTE_CHANGED</pre>
<pre>#Show balancer-manager
&lt;Location /balancer-manager&gt;
  SetHandler balancer-manager
  Order allow,deny
  Allow from all
&lt;/Location&gt;</pre>
<pre>ProxyRequests Off</pre>
<pre>#Configure members for cluster
&lt;Proxy balancer://jakeri&gt;
  BalancerMember http://b1.jakeri.net:80 route=server1
  BalancerMember http://b2.jakeri.net:80 route=server2
  BalancerMember http://b3.jakeri.net:80 route=server3
&lt;/Proxy&gt;</pre>
<pre>#Do not proxy balancer-manager
ProxyPass /balancer-manager !</pre>
<pre>#The actual ProxyPass
ProxyPass / balancer://jakeri/ stickysession=BALANCEID nofailover=Off</pre>
<pre>#Do not forget ProxyPassReverse for redirects
ProxyPassReverse / http://b1.jakeri.net/
ProxyPassReverse / http://b2.jakeri.net/
ProxyPassReverse / http://b3.jakeri.net/
</pre>
<p>I believe that this configuration is somewhat better compared to this <a href="http://www.markround.com/archives/33-Apache-mod_proxy-balancing-with-PHP-sticky-sessions.html">guide</a>.</p>
<p><em>I got to fix my css for the &lt;code&gt;&lt;/code&gt; :-/</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jakeri.net/2009/03/sticky-load-balance-with-apache-httpd-22/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

