<?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>Loadbalancer.org Blog</title>
	<atom:link href="http://blog.loadbalancer.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loadbalancer.org</link>
	<description>&#34;When a single point of failure is not an option&#34;</description>
	<lastBuildDate>Thu, 13 Jun 2013 10:19:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Some small changes to default settings make achieving high availability easier&#8230;..</title>
		<link>http://blog.loadbalancer.org/some-small-changes-to-default-settings-make-achieving-high-availability-easier/</link>
		<comments>http://blog.loadbalancer.org/some-small-changes-to-default-settings-make-achieving-high-availability-easier/#comments</comments>
		<pubDate>Fri, 17 May 2013 11:59:12 +0000</pubDate>
		<dc:creator>Malcolm Turnbull</dc:creator>
				<category><![CDATA[Disaster recovery]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Load Balancing]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=1135</guid>
		<description><![CDATA[Loadbalancer.org has always been about high-availability, that is the fundamental reason for our products existence. Performance has always been a nice side effect while maintainability of your application cluster is generally a key sub-set of the primary high-availability objective. However its time for a confession, the default settings for the Loadbalancer.org appliances in a cluster configuration up until v7.5 [...]]]></description>
				<content:encoded><![CDATA[<p>Loadbalancer.org has always been about high-availability, that is the fundamental reason for our products existence. Performance has always been a nice side effect while maintainability of your application cluster is generally a key sub-set of the primary high-availability objective.</p>
<p>However its time for a confession, the default settings for the Loadbalancer.org appliances in a cluster configuration up until v7.5 have been <span style="font-size: 1rem;">set </span><span style="font-size: 1rem; line-height: 1.714285714;">by default  for both ease of use and certainty of a valid configuration. The default recommendation for setting up or disaster </span>recovery on<span style="font-size: 1rem; line-height: 1.714285714;"> the high-availability of the cluster (Heartbeat) has been to force a full sync and therefore inflict a small amount of down time in a maintenance window.</span></p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/link.jpeg"><img class="size-medium wp-image-1136 aligncenter" alt="link" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/link-300x21.jpeg" width="300" height="21" /></a></p>
<p>&nbsp;</p>
<p>Whilst we&#8217;ve always had documentation showing how to handle cluster maintenance and configuration with zero downtime it was definitely time for a change.</p>
<p><span id="more-1135"></span></p>
<p>So in theory this was a simple change to our default configuration, and yet as always the development team found a few thorny little issues that needed resolving. Previously the default heartbeat configuration used autofailback=on, this was handy in that you always new the master node would be active if it was healthy. However when it comes to a disaster recovery scenario or cluster change it becomes problematic as any failback to the master during the process causes downtime. On the positive side the old method does have the advantage that it quickly shows you if you have a heartbeat configuration problem i.e. the failback to master doesn&#8217;t work.</p>
<p>So we changed the default to autofailback=off, and we also made sure that when you do a  full restore on a node using the XML backup we make sure that heartbeat is stopped until you are ready to join the cluster.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/HeartbeatStopped.jpeg"><img class="alignnone size-medium wp-image-1137" alt="HeartbeatStopped" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/HeartbeatStopped-300x86.jpeg" width="300" height="86" /></a></p>
<p>&nbsp;</p>
<p>Once the XML file is restored you can double check all the settings, make any required changes, possibly relocate the unit physically or logically and then choose to restart the heartbeat.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/beforeharestart.jpeg"><img class="alignnone size-medium wp-image-1138" alt="beforeharestart" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/beforeharestart-300x200.jpeg" width="300" height="200" /></a></p>
<p>&nbsp;</p>
<p>In this case we have restored a master node from scratch and when the heartbeat is restarted, the  new master node will stay passive but join the cluster in a clean fashion. The slave node will keep handling the network traffic to ensure that their is now down time incurred.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/alldoneha.jpeg"><img class="alignnone size-medium wp-image-1139" alt="alldoneha" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/alldoneha-300x69.jpeg" width="300" height="69" /></a></p>
<p>&nbsp;</p>
<p>All seems pretty simple, so why didn&#8217;t we do this before? Well because we did have a couple of little gotchas that need to be dealt with by new code in the background. One of them was the built in <a href="http://boilinglinux.kiosgeek.com/2008/07/02/ha-error-attempted-replay-attack/" target="_blank">replay attack protection in HA-Linux</a>:</p>
<pre>heartbeat[27177]: 2008/07/02_15:27:44 ERROR: should_drop_message: attempted replay attack [lbmaster]? [gen = 18, curgen = 1207732349]</pre>
<p>We had a manual work around for this before but now the software will transparently deal with this issue when restoring from XML (easier said than done as curgen is stored within the process). The other little gotcha only effected customers using network based heartbeat in combination with ping nodes, we fixed this part of heartbeat ages ago so that it would send both nodes live in the case of a network failure (split-brain) or a ping node failure, however when the network connectivity was restored who would go live? This has now been sorted in the case of an XML restore to give the desired behaviour of no down time.</p>
<p><em>BTW: The <a href="http://techthoughts.typepad.com/managing_computers/2007/10/split-brain-quo.html" target="_blank">split-brain heartbeat problem</a> is why we still ship a serial heartbeat cable with all of our hardware appliances.</em></p>
<p>On the subject of no downtime, yet another new feature seems to be causing some uncertainty with our users. Whenever you make a change to a layer 7 HAproxy configuration you now get the following prompt:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/haproxyrestart.jpeg"><img class="alignnone size-medium wp-image-1140" alt="haproxyrestart" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/haproxyrestart-300x128.jpeg" width="300" height="128" /></a></p>
<p>Just to re-assure you, the HAProxy restart (Ed. Why don&#8217;t we rename it to reload then?) is seamless and does not cause downtime! HAProxy allows all existing connections to stay bound to the existing process and only connects new connections to the new configuration and process. The reason we changed from automatically restarting the layer 7 engine is because this can cause confusion with some users connecting to a new configuration and some connecting to the old one. With the new method you can make all the changes that you need to make i.e. multiple changes before doing the smooth restart/activation of the new settings. Also if you have a lot of long timeout connection i.e. Terminal Services you can choose to a full restart of HAproxy rather than the smooth reload to force all the connections to re-establish on the new configuration.<span style="font-size: 1rem;">The future progression of this feature is to allow full commit/rollback style functionality to the configuration interface.</span></p>
<p>One last point to note is that this reload functionality takes effect on both nodes in the cluster, this is to ensure that if you have full layer 7 <a href="http://serverfault.com/questions/328996/is-it-possible-to-synchronize-the-states-of-tcp-proxies-in-real-time-for-real-h" target="_blank">session table replication</a> activated in your configuration the passive node stays up to date with all of the changes.</p>
<p>As always high-availability is only possible if you test and document and re-test your disaster recovery procedures. We hope these changes to our product make your life easier, and the testing and validation procedure much quicker.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/some-small-changes-to-default-settings-make-achieving-high-availability-easier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What do you mean my pipe is saturated?</title>
		<link>http://blog.loadbalancer.org/what-do-you-mean-my-pipe-is-saturated/</link>
		<comments>http://blog.loadbalancer.org/what-do-you-mean-my-pipe-is-saturated/#comments</comments>
		<pubDate>Sat, 04 May 2013 13:51:27 +0000</pubDate>
		<dc:creator>Malcolm Turnbull</dc:creator>
				<category><![CDATA[haproxy]]></category>
		<category><![CDATA[Load Balancing]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=1098</guid>
		<description><![CDATA[Some of the most common questions we get at Loadbalancer.org are performance related. It is quite difficult to give a straight answer to these questions as the real answer is the slightly unsatisfactory, &#8221; Um&#8230; well it depends on your application&#8230;&#8221;. The following graph showing HAProxy performance for different object sizes gives you a much [...]]]></description>
				<content:encoded><![CDATA[<p>Some of the most common questions we get at Loadbalancer.org are performance related. It is quite difficult to give a straight answer to these questions as the real answer is the slightly unsatisfactory, &#8221; Um&#8230; well it depends on your application&#8230;&#8221;. The following graph showing HAProxy performance for different object sizes gives you a much better idea of the problem:<a href="http://haproxy.1wt.eu/"><br />
</a></p>
<p style="text-align: center;"><img class="size-medium wp-image-1099 aligncenter" alt="HaProxybench" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/HaProxybench-300x112.png" width="300" height="112" /></p>
<p>As you can quickly see from this graph, the number of connections/s, bandwidth and object size are all closely correlated. Depending on your application and usage pattern you will get vastly different throughput results from your load balanced cluster.</p>
<p><span id="more-1098"></span></p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">Generally even our smallest appliance can fill a 1GB pipe (we have several customers easily doing 2Gb+), But we do have some guidelines for our sales guys:</span><br />
For deployments using Layer 7 and expecting a very large number of connections/second, or deployments with a large number of SSL TPS &#8211; This is very CPU intensive so we generally recommend our MAX or Dell hardware.<br />
For Layer 7 deployments with very large numbers of long connections i.e. Exchange 2010 with 5000+ users &#8211; This is very memory intensive so we generally recommend our MAX or Dell hardware or the ENTERPRISE VA.</p>
<p><span style="line-height: 1.714285714; font-size: 1rem;">So one of the problems that load balancer vendors have is specifying good looking numbers i.e big ones, relating to their load balancer performance. Loadbalancer.org is just as guilty as the other vendors in using best case scenarios for performance:</span></p>
<p style="text-align: center;"><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/05/matrix.png"><img class="size-medium wp-image-1101 aligncenter" alt="matrix" src="http://blog.loadbalancer.org/wp-content/uploads/2013/05/matrix-300x75.png" width="300" height="75" /></a></p>
<p> Does this specification mean that you can get 60,000 HTTP requests a second AND 1.5GBps throughput? I don&#8217;t think so&#8230;&#8230;.</p>
<p>Does this specification mean that you can get 500 SSL TPS on our least powerful appliance with a 2048 Bit key? I don&#8217;t think so&#8230;&#8230;</p>
<p>Loadbalancer.org SSL stats are all based on 1024 Bit keys&#8230;..<br />
One of our guys will shortly write a blog on the full test process we use + a comparison of the different cyphers and their effect on performance, he even has a $16K Thales crypto card he&#8217;s been putting through its paces for an interesting comparison of SSL Hardware/ASIC Acceleration versus generic multi-core CPUs&#8230;.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/what-do-you-mean-my-pipe-is-saturated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Look why can&#8217;t you just tell me how many people are connected to the load balancer?</title>
		<link>http://blog.loadbalancer.org/look-why-cant-you-just-tell-me-how-many-people-are-connected-to-the-load-balancer/</link>
		<comments>http://blog.loadbalancer.org/look-why-cant-you-just-tell-me-how-many-people-are-connected-to-the-load-balancer/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 21:29:39 +0000</pubDate>
		<dc:creator>Malcolm Turnbull</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Load Balancing]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=1063</guid>
		<description><![CDATA[I must confess , at certain times it has looked like open warfare would break out between the support team and development team at Loadbalancer.org over the last few months. One reason being that a major change in v7.5 is that all connection information is now displayed as a graph (rather than a static number). [...]]]></description>
				<content:encoded><![CDATA[<p>I must confess , at certain times it has looked like open warfare would break out between the support team and development team at Loadbalancer.org over the last few months.<br />
One reason being that a major change in v7.5 is that all connection information is now displayed as a graph (rather than a static number). The support team was convinced that customers just wanted a number, a single number , a golden number&#8230; The development team was convinced that such a number was illogical irrelevant and meaningless&#8230;&#8230;</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/SysOverview.png"><img class="alignnone size-medium wp-image-1080" alt="SysOverview" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/SysOverview-300x116.png" width="300" height="116" /></a></p>
<p>It will be very interesting to see what the customers think!</p>
<p><span id="more-1063"></span></p>
<p>Historically most of our customers have used Layer 4 load balancing, which is fast and transparent and simple&#8230; and while most customers were happy with the current connection number, as it sounded about right&#8230;what did it actually mean? Not a lot&#8230; as it transpired.</p>
<p>Loadbalancer.org, Barracuda Networks &amp; Kemp Technologies all use LVS (Linux Virtual Server) as the underlying Layer 4 packet engine. This awesome Linux kernel based load balancer could not give a monkeys how many users or sessions are connected to it, it just blasts the traffic through as fast as possible&#8230;.Don&#8217;t get me wrong, LVS does know exactly what it is doing, it can tell you how many TCP connections are ESTABLISHED, WAITING etc. But does that information actually help a network administrator know how many users/sessions are connected? Not really&#8230; especially in DR mode where the load balancer can&#8217;t even tell if the connection has been closed by the server so it just guesses that that each connection is open for 2 minutes&#8230;..</p>
<p>The funny thing is that only about 0.05% of customers at Layer 4 even noticed that the connection numbers were a bit weird/useless.</p>
<p>When it comes to Layer 7 you would think it gets easier, which it does because at Layer 7 you know exactly who is connected at every point in time&#8230;.</p>
<p>However 78.6% of our customers were NOT happy that the connection count was so low!<br />
Why was the count so low at Layer 7? Because it knew damn well that the server/client disconnects almost immediately with HTTP traffic (as it is a connectionless protocol remember?)</p>
<p>So after several beers (yes we are English) the development team decided that what we actually need was two things&#8230;</p>
<p>1) A &#8216;Gauge&#8217; of how many new connections occurred over a specific time period i.e. 10 seconds&#8230;<br />
2) A specific number of connections if those connections were held open over a long period i.e. 15 RDP (Terminal Server Connections) held over a 20 minute period&#8230;.</p>
<p>Now anyone in their right mind (and by that I mean the support team) would know that you can&#8217;t put two different measures like that in the same graph&#8230;.. But the development team seam to know better&#8230;.</p>
<p>So now the graphs plot connections/10 second period if the total connection count is climbing&#8230;..<br />
OR<br />
Total Current Connections if the total connection count is NOT climbing&#8230;..</p>
<p>I just wrote that down and it still doesn&#8217;t make any sense!</p>
<p>I&#8217;m glad to say that the other load balancer vendors have exactly the same problem:</p>
<p>Look at these Barracuda Networks graphs:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/Barracuda.gif"><img class="alignnone size-medium wp-image-1064" alt="Barracuda" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/Barracuda-300x223.gif" width="300" height="223" /></a></p>
<p>&nbsp;</p>
<p>What the heck does that mean?</p>
<p>I was clicking the web page repeatedly and it is saying I have approx 0.42 connections? Very useful.</p>
<p>OK, So what do the numbers show?</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/BarracudaNumbers.gif"><img class="alignnone size-medium wp-image-1065" alt="BarracudaNumbers" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/BarracudaNumbers-300x15.gif" width="300" height="15" /></a></p>
<p>Um , nothing&#8230;.. am I not connected then?</p>
<p>I must admit Kemp Technologies do a lot better:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/KempNumbers.gif"><img class="alignnone size-medium wp-image-1066" alt="KempNumbers" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/KempNumbers-300x27.gif" width="300" height="27" /></a></p>
<p>&nbsp;</p>
<p>They try and show connections over:  60 seconds avg. /  5 mins avg. / 30 mins avg. etc<br />
Which almost makes a lot of sense, but is pretty ugly and hard to read isn&#8217;t it?</p>
<p>Now I&#8217;m sure that both Kemp &amp; Barracuda will say , &#8220;Ah, yeah but, please use SNMP to figure out what the heck is going on&#8230;..&#8221;<br />
And to be honest they are right, and that is what Loadbalancer.org also recommends&#8230;.<br />
BUT&#8230;. SNMP reporting is a pain to configure&#8230; so as of v7.5 all Loadbalancer,org appliances automatically and dynamically generate graphs of all connections to virtual/real servers&#8230;..</p>
<p>For example, the old v7.x Loadbalancer.org appliances would report the current number of connections per virtual server/ real server:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/throughputNIC83000cons-safe.png"><img class="alignnone size-medium wp-image-1078" alt="throughputNIC83000cons-safe" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/throughputNIC83000cons-safe-300x208.png" width="300" height="208" /></a><img class="alignnone size-medium wp-image-1077" alt="9real servers exchange-safe" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/9real-servers-exchange-safe-300x96.png" width="300" height="96" /></p>
<p>&nbsp;</p>
<p>Which is great for point in time snapshot recording&#8230;.<br />
i.e. we have 110,000 connections so our exchange server farm is pretty busy&#8230;&#8230;.</p>
<p>Now.. in v7.5,  we will get a graph showing exactly which server is handling the most traffic and also clearly highlighting any historical drops in traffic i.e. technical problems!<br />
Just click on the little blue graph icon next to each VIP/RIP on the system overview&#8230;..<br />
<a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/SysOverview.png"><img class="alignnone size-medium wp-image-1080" alt="SysOverview" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/SysOverview-300x116.png" width="300" height="116" /></a></p>
<p>And it would be really useful if I had an actual graph here to help with the explanation&#8230;</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/RDPDaily.png"><img class="alignnone size-medium wp-image-1132" alt="RDPDaily" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/RDPDaily-300x97.png" width="300" height="97" /></a></p>
<p>The graph above shows a fairly healthy pair of Terminal Servers with even load balancing distribution over a day. Any failure or uneven load would be fairly easy to spot either from the graph or the load averages. You would then need to drill down for more data.</p>
<p>Anyway my basic point is , please can you try our new dynamic graph stuff and tell us:</p>
<p>a) It sucks, you suck&#8230; what do you do again?</p>
<p>b) Can I have my reassuring but irrelevant connection numbers back please?</p>
<p>c) Something more constructive&#8230;</p>
<p>BTW&#8230; One of the other cool things we did is move all of the server side processing of the system overview page onto the client using Javascript&#8230; No doubt this will end in tears but the intention was to allow the system overview page to handle hundreds of servers without a performance hit&#8230; This was also a reason for removing the connection counters (performance..), the graphs are only generated when you request them on a per VIP/RIP basis&#8230;.</p>
<p>While I&#8217;m at it&#8230;.</p>
<p>Who the heck removed the CPU load statistics!</p>
<p>Um, time for a quick diagram:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/LB-SystemLoad-daily.gif"><img class="alignnone size-medium wp-image-1069" alt="LB-SystemLoad-daily" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/LB-SystemLoad-daily-300x100.gif" width="300" height="100" /></a></p>
<p>We now use a standard Linux system Load graph to tell you how busy the load balancer is&#8230;&#8230;.<br />
You know the thing you get when you type uptime on a Linux box?</p>
<p>[root@lbmaster ~]# uptime<br />
22:19:57 up 15:04, 1 user, load average: 0.09, 0.04, 0.01</p>
<p>What the heck does that mean?</p>
<p>I have no idea&#8230;. BUT the basic gist is:</p>
<p>Linux System Load = Amount of processes waiting for a processor</p>
<p>Why is that useful? Because it tells you very quickly if things are going wrong with any part of the system&#8230; that&#8217;s why.</p>
<p>Most Loadbalancer.org hardware has 4+ cores &#8230; so any load reading &gt; 4 is VERY bad&#8230;&#8230;&#8230;</p>
<p>Contact support and have a chat&#8230;. It could be Memory / Hard Drive / CPU / Quarks &#8230; who knows, but at least the graph is pretty&#8230;.</p>
<p>Now lets get back to the conversation about numbers v graphs&#8230;.</p>
<p>Connection number graphs are all very well and good &#8230;. they will probably tell you at a quick glance if one of your servers is having issues&#8230;.<br />
But what other information can we get? Well at Layer 4&#8230; not an awful lot&#8230; so you will need to head straight to your server error/connection logs and start analysing them.</p>
<p>However at Layer 7 we do have quite a bit more information:</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/04/HaproxyStats114000cons.png"><img class="alignnone size-medium wp-image-1074" alt="HaproxyStats114000cons" src="http://blog.loadbalancer.org/wp-content/uploads/2013/04/HaproxyStats114000cons-300x133.png" width="300" height="133" /></a></p>
<p>Haproxy gives a good snapshot of current and total session/connection/error data. However straight numbers are quite hard to analyse,<br />
so wouldn&#8217;t graphs be useful here as well?</p>
<p>Also at Layer 7 you can turn on full logging on the load balancer, but Loadbalancer.org strongly recommend only doing this briefly or using an external syslog server&#8230;.</p>
<p>You can quickly get an awful lot of logs!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/look-why-cant-you-just-tell-me-how-many-people-are-connected-to-the-load-balancer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Microsoft drops support for mstshash cookies? (embrace and destroy policy?)</title>
		<link>http://blog.loadbalancer.org/microsoft-drops-support-for-mstshash-cookies/</link>
		<comments>http://blog.loadbalancer.org/microsoft-drops-support-for-mstshash-cookies/#comments</comments>
		<pubDate>Fri, 15 Mar 2013 15:32:51 +0000</pubDate>
		<dc:creator>Mathew.Levett</dc:creator>
				<category><![CDATA[haproxy]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Microsoft Terminal Server]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=992</guid>
		<description><![CDATA[Recently we have seen quite a few customer issues where using RDP cookies (mstshash cookies see - http://www.snakelegs.org for more details) seems to result in multiple active sessions over several RDP servers as shown below (Notice the user Rob on both TS Servers). So we decided to investigate this and find out why&#8230;&#8230;.. Where do we [...]]]></description>
				<content:encoded><![CDATA[<p>Recently we have seen quite a few customer issues where using RDP cookies (mstshash cookies see - <a href="http://www.snakelegs.org/2011/02/06/rdp-cookies-2/" target="_blank"> http://www.snakelegs.org </a> for more details) seems to result in multiple active sessions over several RDP servers as shown below (Notice the user Rob on both TS Servers).</p>
<p><center><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/03/RDP-Screen-shot.png"><img class="size-medium wp-image-994 aligncenter" alt="Duplicate RDP Users" src="http://blog.loadbalancer.org/wp-content/uploads/2013/03/RDP-Screen-shot-300x177.png" width="300" height="177" /></a></center>So we decided to investigate this and find out why&#8230;&#8230;..</p>
<p>Where do we start?, well our first thought was to check if there were any issues with the load balancing application or its configuration. we found that everything there looked to be fine except that not every user seemed to be in the stick table and that testing the exact same environment with Windows XP or a Linux client we were unable to replicate the issue.</p>
<p><span id="more-992"></span></p>
<p>OK so what do we do now. we know the load balancer and its configuration seam to be working as it should as the XP client etc.  So what is windows 7 and above doing that is different and why is there not always all the users in the stick table?&#8230;</p>
<p>After some research we found the TechNet documentation on the <a href="http://msdn.microsoft.com/en-us/library/cc240470.aspx" target="_blank">x.224 Connection Request PDU</a>  and the following key text.</p>
<p>&lt;13&gt; Section 3.2.5.3.1: Microsoft RDP 5.1, 5.2, 6.0, 6.1, 7.0, 7.1, and 8.0 clients <b>always include the cookie field in the X.224 Connection Request PDU if a nonempty username can be retrieved for the current user</b> <b>and the routingToken field is not present</b> (the IDENTIFIER used in the cookie string is the login name of the user truncated to nine characters).</p>
<p>Ok so that makes sense, when making a connection request the client should send a cookie made from the users username so the loadbalancer knows who the user is. We fired up Wireshark and what do you know we found that the new client does not always send this cookie. it seems it will not send it or the incorrect cookie in the following conditions:</p>
<ol>
<li>Starting the client and using the cached/saved credentials, then no hash is sent.</li>
<li>Mistyping the username and then correcting, mstsc still uses the old username as the hash and not the updated username.</li>
<li>Under certain conditions if a user entered the wrong password the cookie would default to domain/user and not the expected user@domain format that was entered in the username field.  This is an issue for users with domains over 9 characters long as the cookie is then allowed to be duplicated for many users or not match the previously used cookie.</li>
</ol>
<p>Ok so what happens with the XP client.  Well this seems to follow the documentation and explains why that worked.</p>
<p>how do we fix this? Well the TechNet Docs say this is how it works, yet the client does not do this&#8230;</p>
<p>Sounds like a bug so lets log it with Microsoft&#8230;&#8230;First problem. how the hell do you log a bug? nothing stands out from their site so instead we paid  and logged a support call with them (which is still ongoing 4 months later).</p>
<p>So where does this all lead.  Well so far Microsoft have stated this is and i quote (including spelling mistake) from them:</p>
<blockquote><p><em>&#8220;The behavior that you are experiencing is a documentation bug and we are currently in the process of publishing a Knowledge Base article for it&#8221;</em></p></blockquote>
<p>Err ok, so a Microsoft Product does not follow their own documentation and they say it is a Documentation bug? So their answer is if a product does not fit the design spec, just change the spec. I have now seen the new version of the documentation and it now says&#8230;</p>
<blockquote><p>&#8220;<strong>cookie (variable): </strong>An optional and variable-length <a href="http://msdn.microsoft.com/en-us/library/ab35aee7-1cf7-42dc-ac74-d0d7f4ca64f7#ansich" target="blank">ANSI character</a> string terminated by a 0x0D0A two-byte sequence. This text string MUST be &#8220;Cookie: mstshash=IDENTIFIER&#8221;, where IDENTIFIER is an ANSI character string (an example cookie string is shown in section <a href="http://msdn.microsoft.com/en-us/library/cc240842.aspx" target="blank">4.1.1</a>). The length of the entire cookie string and CR+LF sequence is included in the <strong>X.224 Connection Request Length Indicator</strong> field. This field MUST NOT be present if the <strong>routingToken</strong> field is present.&#8221;</p></blockquote>
<p>So now its an optional item,and not always sent.  Well thats no good to anyone using RDP cookies.</p>
<p>They also say there is a perfectly valid workaround&#8230;.. but failed to advise what it was, well after chasing for it we are told&#8230;.</p>
<blockquote><p><em>&#8220;This problem occurs only when the same MSTSC process is used to connect to a server with 2 different credentials. The scenario can easily workaround by starting a new MSTSC process before connecting to the server with different credentials.&#8221;</em></p></blockquote>
<p>Really?  Well to us this indicates an issue with the MSTSC client where it is unable to update its own cookies without having to restart the application, and after many emails back and forth we get the very latest response.</p>
<blockquote><p><em>&#8220;Based on my internal discussions, we conclude that for load balancing terminal servers, using Session Directory is the recommended approach. This whitepaper talks more about the implementation <a href="http://download.microsoft.com/download/8/6/2/8624174c-8587-4a37-8722-00139613a5bc/TS_Session_Directory.doc" target="_blank"> http://download.microsoft.com/<wbr />download/8/6/2/8624174c-8587-<wbr />4a37-8722-00139613a5bc/TS_<wbr />Session_Directory.doc</a>. In the business impact statement that you had provided, I did see that you have mentioned that you cannot use Session Directory.&#8221;</em></p></blockquote>
<p>Well thats lovely for anyone with Windows 2003 Enterprise and above, what about users of 2003 Standard who do not have the Session Directory included? hell their document even says this.</p>
<blockquote>
<p lang="en-US">&#8220;Note:</p>
<p lang="en-US">Terminal servers must be running Windows Server 2003 Enterprise Edition or Windows Server 2003 Datacenter Edition to participate in a Session Directory-enabled farm.&#8221;</p>
</blockquote>
<p lang="en-US">Well we are still waiting for an answer to this from Microsoft but it looks like the RDP cookie maybe being dropped by Microsoft and no fix in sight&#8230; Guess we will just have to wait and see what they say next, however we would love to hear from anyone else who is experiencing the same issues as us so we can advise Microsoft of other users who are being hampered by this issue.</p>
<p lang="en-US">Update&#8230;</p>
<p>Well it looks like Microsoft have indeed silently dropped support for mstshash cookies for load balancing as suspected&#8230;..</p>
<p>As detailed in the last post we had a call open with Microsoft and have just received the following response that confirms our suspicions that they have in fact dropped support for mstshash silently in favour of their Session Directory/Broker solutions.</p>
<blockquote><p>Mathew</p>
<p>Hope this email finds you well. I regret to state that, I’ve a negative news for you.</p>
<div>
<p>Based on the triage of code with product group, they suggest you to devise some alternate way to achieve load balancing.</p>
<p>According to them, the dependency you took on the optional cookie field is not recommended or supported.</p>
<p>The protocol documentation does not specify what is passed in that field and the value can change based on the scenario.</p>
<p>Unfortunately, there are no plans on updating the documentation as it does not call out what is being passed in this field and is already marked as optional.</p>
<p>Please let me know if you wish to have a conference call with us on this matter.</p>
<p>I would attempt to bring the PM on call.</p>
<p>Thank you for your understanding and patience. I again, is truly regretful.</p>
</div>
<p><b>Subheet Rastogi</b> | Support Lead</p>
<p>Enterprise Platforms | Microsoft Corporation | Office: &lt;number removed&gt;</p></blockquote>
<div>
<p>Unfortunately it seems they have decided to change the documentation to fit their product changes rather then fix their product to work as the original documentation detailed that has since been updated.</p>
<p>Oh well guess you win some and you lose some.</p>
</div>
<p lang="en-US">
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/microsoft-drops-support-for-mstshash-cookies/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Exchange 2013 &#8211; Microsoft finally have an email solution designed for high availability and load balancing</title>
		<link>http://blog.loadbalancer.org/exchange-2013-microsoft-finally-have-an-email-solution-designed-for-high-availability-and-load-balancing/</link>
		<comments>http://blog.loadbalancer.org/exchange-2013-microsoft-finally-have-an-email-solution-designed-for-high-availability-and-load-balancing/#comments</comments>
		<pubDate>Sat, 23 Feb 2013 21:14:42 +0000</pubDate>
		<dc:creator>Malcolm Turnbull</dc:creator>
				<category><![CDATA[Microsoft Exchange]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=977</guid>
		<description><![CDATA[OK, So maybe my blog title is a little harsh. The Microsoft Exchange products have been pretty scaleable since Exchange 2007. Exchange 2010 had some vast improvements and you could tell that the Microsoft engineers had put a lot of effort into trying to ease the painful mess that was load balancing an Exchange 2007 [...]]]></description>
				<content:encoded><![CDATA[<p>OK, So maybe my blog title is a little harsh. The Microsoft Exchange products have been pretty scaleable since Exchange 2007.<br />
Exchange 2010 had some vast improvements and you could tell that the Microsoft engineers had put a lot of effort into trying to ease the painful mess that was load balancing an Exchange 2007 cluster. They even started recommending hardware load balancers and <a href="http://technet.microsoft.com/en-us/exchange/gg176682.aspx" target="_blank">certifying vendors for Exchange 2010 compatibility</a>.</p>
<p>But with Exchange 2013 they appear to have started from scratch and written it properly! They actually sat down and said &#8220;What do we need to have a scaleable Exchange email cluster?&#8221;. Funnily enough they came up with the same answer that Loadbalancer.org has been banging on about for last 10 years. In order to have a scaleable cluster, each node in the cluster must be able to handle <strong>any</strong> user session at <strong>any</strong> time; i.e. no messing around with persistence, sticky plasters, and hack jobs.</p>
<p>Well done Microsoft!</p>
<p><span id="more-977"></span></p>
<p>But please can you put the same infrastructure architects on your LYNC team?</p>
<p>Seriously, who puts 3 DMZs in an enterprise product? I had to put Rob (who made sure <a href="http://technet.microsoft.com/en-us/lync/gg131938.aspx" target="_blank">Loadbalancer.org gained Microsoft Lync certification</a>) on suicide watch &#8230;</p>
<p>Better get back to discussing the point of this blog I guess &#8230;</p>
<p>In order to gain high-availability for an application a load balancer is fairly fundamental, because a load balancer gives you:</p>
<p><strong>Resilience:</strong> A load balancer continuously monitors your application servers and, if it detects a problem with them, it moves the traffic onto another server in the cluster. This was <strong>not</strong> possible before Exchange 2013 without a brief interruption of service. Now it&#8217;s easy. Tony Redmond has some good points about <a href="http://thoughtsofanidlemind.wordpress.com/2012/11/14/exchange-2013-namespaces/" target="_blank">how important flexible health monitoring of Exchange 2013</a> still is.</p>
<p><strong>Maintainability:</strong> You can&#8217;t have 100% uptime on every server, eventually they will break or at least need security updates or software updates. With a load balancer you simply drain the connections, perform the maintenance, and then bring the server back online. <a href="http://thoughtsofanidlemind.wordpress.com/2012/11/14/exchange-2013-namespaces/" target="_blank">Exchange 2013 makes software upgrades easy</a> as discussed by Rand Morimoto.</p>
<p><strong>Performance:</strong> This one is often misunderstood. Contrary to popular belief you don&#8217;t need a super fast load balancer to increase your performance &#8211; you just add more backend servers to the cluster! However this requires that the cluster can handle horizontal scaling which also was <strong>not</strong> possible before Exchange 2013.</p>
<p>Kemp Technologies (one of our main competitors) is going to be gutted by the changes in Exchange 2013. They made this lovely <a href="http://www.kemptechnologies.com/fileadmin/templates/sizingDoc/lme_calc_2k/lme_calc_2k.htm" target="_blank">sell up tool</a> which shows how much horse power you need to SSL terminate in front of Exchange 2010 clusters. Don&#8217;t get me wrong they have a great product; it&#8217;s just that with Exchange 2013, customers will no longer need <strong>any</strong> SSL termination on the load balancer so their cheapest product will handle the load easily.</p>
<p>F5 &#8211; who are very deservedly the market leader in the load balancing space &#8211; are mounting a <a href="https://devcentral.f5.com/blogs/us/f5-friday-enhancing-microsoft-exchange-2013#.USjbyqXHPXU" target="_blank">defensive PR reaction to Exchange 2013 improvements</a> already. BTW: <a href="https://devcentral.f5.com/blogs/us/ensuring-secure-reliable-and-highly-available-e-mail-using-microsoft-exchange-server-2013" target="_blank">This post by Ryan Korock is terrible</a>; at least come up with some real reasons to use F5, i.e. awesome logging, monitoring, snmp interrogation, L7 performance based re-directing, re-direct on failure of connections. Come on man &#8230; L7 rocks when you have the capability of an F5!</p>
<p>Anyway long story short but if you are in the middle of an Exchange 2010 migration then do yourself a favour: <em><strong>Stop now</strong><strong>!</strong></em> Whatever the initial cost to move to Exchange 2013 right now, it&#8217;s awesome!</p>
<p>PS: <a href="http://dkalemis.wordpress.com/2012/08/28/should-companies-upgrade-to-exchange-server-2013/">Dimitrios Kalemis</a> agrees with me &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/exchange-2013-microsoft-finally-have-an-email-solution-designed-for-high-availability-and-load-balancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HAProxy Email Alerts Guide</title>
		<link>http://blog.loadbalancer.org/haproxy-email-alerts-guide/</link>
		<comments>http://blog.loadbalancer.org/haproxy-email-alerts-guide/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 15:37:59 +0000</pubDate>
		<dc:creator>Aaron West</dc:creator>
				<category><![CDATA[haproxy]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=898</guid>
		<description><![CDATA[In this guide I show a very simple solution to get HAProxy email alerts configured using Logwatch. While the first part is aimed at users of our V7 appliance I think anyone wanting to get email alerts for HAProxy will also find this a good example. First from the WUI : 1. Set the external [...]]]></description>
				<content:encoded><![CDATA[<p>In this guide I show a very simple solution to get HAProxy email alerts configured using Logwatch. While the first part is aimed at users of our V7 appliance I think anyone wanting to get email alerts for HAProxy will also find this a good example. </p>
<p>First from the WUI :</p>
<p>1. Set the external relay(Smart Host) under Edit Configuration &gt; Physical &#8211; Advanced Configuration.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/phys-adv-shot.jpeg"><span id="more-898"></span><img class="aligncenter size-full wp-image-899" alt="phys-adv-shot" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/phys-adv-shot.jpeg" width="691" height="465" /></a></p>
<p>2. Enable HAProxy Logging under Edit Configuration &gt; Layer 7 &#8211; Advanced Configuration.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/l7-adv.jpeg"><img class="aligncenter size-full wp-image-908" alt="l7-adv" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/l7-adv.jpeg" width="693" height="162" /></a></p>
<p>Then from the CLI :</p>
<p>1. Install the logwatch package using yum like so :</p>
<p><code>[root@lbmaster ~]# yum --disableexcludes=all install logwatch</code></p>
<p>2. Create the following file and set your To/From email addresses : /etc/logwatch/conf/logwatch.conf</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="perl" style="font-family:monospace;">MailTo <span style="color: #339933;">=</span> myemailaddress<span style="color: #0000ff;">@example</span><span style="color: #339933;">.</span>com
MailFrom <span style="color: #339933;">=</span> LBMaster<span style="color: #0000ff;">@example</span><span style="color: #339933;">.</span>com</pre></td></tr></table></div>

<p>At this point you&#8217;ll have a standard Logwatch install which will send an email once per day (you may want to disable this).</p>
<p>*To disable the daily logwatch email execute : <code>chmod -x /etc/cron.daily/0logwatch</code></p>
<p>3. Create a custom Layer 7 check</p>
<p>a. Create the following file adding the contents below : /etc/logwatch/conf/logfiles/layer7.conf</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="perl" style="font-family:monospace;">LogFile <span style="color: #339933;">=</span> <span style="color: #339933;">/</span>var<span style="color: #339933;">/</span><span style="color: #000066;">log</span><span style="color: #339933;">/</span>haproxy<span style="color: #339933;">.</span><span style="color: #000066;">log</span>
<span style="color: #0000ff;">*OnlyHost</span>
<span style="color: #0000ff;">*ApplyStdDate</span></pre></td></tr></table></div>

<p>b. Next create the script : /etc/logwatch/scripts/services/layer7</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$find</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;is UP|is DOWN&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@lines</span> <span style="color: #339933;">=</span> <span style="color: #009999;">&lt;STDIN&gt;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@lines</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/$find/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;$_<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>c. Finally create the following file : /etc/logwatch/conf/services/layer7.conf</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="perl" style="font-family:monospace;">Title <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Layer 7 Errors&quot;</span>
LogFile <span style="color: #339933;">=</span> layer7</pre></td></tr></table></div>

<p>4. Enable the Logwatch job to run every minute with Cron</p>
<p>a. Edit crontab with the following command :</p>
<p><code>[root@lbmaster ~]# crontab -e</code></p>
<p>b. Add the following new line to root&#8217;s crontab :</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*/</span>01 <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">nice</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">19</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>logwatch <span style="color: #660033;">--service</span> layer7 <span style="color: #660033;">--range</span> <span style="color: #ff0000;">'-1 minutes for that minute'</span></pre></td></tr></table></div>

<p>Once this is complete you&#8217;ll now receive an email in the event of a real server failure. The way this works is that logwatch will run every minute and search the previous minutes log entries for servers that are taken down or brought up during that time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/haproxy-email-alerts-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loadbalancer.org GmbH &#8211; Loadbalancer.org open German office and Exhibit at Cebit 2013</title>
		<link>http://blog.loadbalancer.org/loadbalancer-org-gmbh-cebit-2013/</link>
		<comments>http://blog.loadbalancer.org/loadbalancer-org-gmbh-cebit-2013/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 12:06:15 +0000</pubDate>
		<dc:creator>Richard Halcrow</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=853</guid>
		<description><![CDATA[Loadbalancer.org are pleased to announce the opening of an office in Germany. Loadbalancer.org GmbH, Alt Pempelfort 2, 40211 Düsseldorf, Germany phone &#8211; +49 (0)30 920 383 6494 email &#8211; vertrieb@loadbalancer.org “I have always wanted to open an office in Germany but felt I wanted a German speaking support team first” states Malcolm Turnbull, Managing Director, Loadbalancer.org. [...]]]></description>
				<content:encoded><![CDATA[<p>Loadbalancer.org are pleased to announce the opening of an office in Germany.</p>
<p>Loadbalancer.org GmbH,<br />
Alt Pempelfort 2,<img class="size-medium wp-image-860 alignright" alt="IMG_6674" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6674-300x199.jpg" width="300" height="199" /><br />
40211 Düsseldorf,<br />
Germany<br />
phone &#8211; +49 (0)30 920 383 6494<br />
email &#8211; vertrieb@loadbalancer.org</p>
<p>“<em>I have always wanted to open an office in Germany but felt I wanted a German speaking support team first</em>” states Malcolm Turnbull, Managing Director, Loadbalancer.org.</p>
<p>&nbsp;</p>
<p><span id="more-853"></span></p>
<p><img class="size-full wp-image-866 alignleft" alt="Henry" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/Henry.jpg" width="173" height="229" /></p>
<p>Henry Meitzer, Sales Manager, Loadbalancer.org states &#8220;<em>Opening the Germany is a huge step forward for Loadbalancer.org, I think its a great opportunity to expand our customer base within Germany</em>&#8220;.</p>
<p>&nbsp;</p>
<p>To celebrate the opening of our new office we are exhibiting at the Cebit 2013, Hannover.  Why not come and meet the Loadbalancer.org team, we are in <strong>Hall 12, Stand C40. </strong>More information email sales@loadbalancer.org or visit our profile page on the <a href="http://www.cebit.de/exhibitor/loadbalancer.org/W768116" target="blank">Cebit Website</a>. We have spare entry tickets if you require one then get in contact.</p>
<p>UPDATE &#8211; We survived, well just about. Below are some of the pictures from the show:<br />
<a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1675.jpg" target="blank"><img class="alignnone size-medium wp-image-1049" alt="IMG_1675" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1675-300x200.jpg" width="300" height="200" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1678.jpg" target="blank"><img class="alignnone size-medium wp-image-1050" alt="IMG_1678" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1678-300x200.jpg" width="300" height="200" /></a></p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1697.jpg" target="blank"><img class="alignnone size-medium wp-image-1051" alt="IMG_1697" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1697-300x200.jpg" width="300" height="200" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1703.jpg" target="blank"><img class="alignnone size-medium wp-image-1052" alt="IMG_1703" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1703-200x300.jpg" width="200" height="300" /></a></p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1770.jpg"><img class="alignnone size-medium wp-image-1053" alt="IMG_1770" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_1770-300x200.jpg" width="300" height="200" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/Screen1.jpg" target="blank"><img class="alignnone size-medium wp-image-1054" alt="Screen1" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/Screen1-300x213.jpg" width="300" height="213" /></a></p>
<h4>Our previous trade show include:</h4>
<p>Infosecurity Europe (London) <a href="http://www.infosec.co.uk" target="_blank">www.infosec.co.uk</a></p>
<p>This was my first custom build stand at a trade show. The stand came together smoothly but without the help of Marina and her team at <a href="http://www.inspiredisplays.co.uk" target="blank">Inspire Displays</a> I would not have been able to get it looking so good. Their attention to detail amazed me.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6673.jpg" target="_blank"><img class="alignnone size-medium wp-image-859" alt="IMG_6673" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6673-300x199.jpg" width="300" height="199" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6671.jpg" target="_blank"><img class="alignnone size-medium wp-image-858" alt="IMG_6671" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6671-199x300.jpg" width="199" height="300" /></a></p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6674.jpg" target="_blank"><img class="alignnone size-medium wp-image-860" alt="IMG_6674" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6674-300x199.jpg" width="300" height="199" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6676.jpg" target="_blank"><img class="alignnone size-medium wp-image-861" alt="IMG_6676" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_6676-300x199.jpg" width="300" height="199" /></a></p>
<p>IPexpo (London) - <a href="http://www.ipexpo.co.uk" target="blank">www.ipexpo.co.uk</a></p>
<p>We skipped the IPexpo trade show for a couple of years, but this year we came back with bang. This turned out to be the perfect year to visit, we met existing customers as well as picking up a handful of new ones.</p>
<p><a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_5125.jpg" target="_blank"><img class="alignnone size-medium wp-image-864" alt="IMG_5125" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_5125-300x199.jpg" width="300" height="199" /></a></p>
<p>Infosecurity (Netherlands) &#8211; <a href="http://www.infosecurity.nl" target="_blank">www.infosecurity.nl</a></p>
<p>Our first visit to Holland, what fun we had. We have a large customer base here, it was the perfect opportunity to meet some of them.<br />
<a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_0075.jpg" target="_blank"><img class="alignnone size-medium wp-image-856" alt="IMG_0075" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_0075-300x199.jpg" width="300" height="199" /></a> <a href="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_0081.jpg" target="_blank"><img class="alignnone size-medium wp-image-857" alt="IMG_0081" src="http://blog.loadbalancer.org/wp-content/uploads/2013/02/IMG_0081-300x199.jpg" width="300" height="199" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/loadbalancer-org-gmbh-cebit-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up HAProxy with Transparent Mode on Centos 6.x</title>
		<link>http://blog.loadbalancer.org/setting-up-haproxy-with-transparent-mode-on-centos-6-x/</link>
		<comments>http://blog.loadbalancer.org/setting-up-haproxy-with-transparent-mode-on-centos-6-x/#comments</comments>
		<pubDate>Mon, 12 Nov 2012 14:34:14 +0000</pubDate>
		<dc:creator>Scott McKeown</dc:creator>
				<category><![CDATA[haproxy]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=808</guid>
		<description><![CDATA[Transparent mode with HAProxy allows you to see the IP Address of the clients computer while still having a high availability service using HAProxy. This posting shows how to setup a blank virgin installation of Centos 6.3 64bit minimum installation. This guide works on the assumption that you have a public facing IP Address of [...]]]></description>
				<content:encoded><![CDATA[<p>Transparent mode with HAProxy allows you to see the IP Address of the clients computer while still having a high availability service using HAProxy.</p>
<p>This posting shows how to setup a blank virgin installation of Centos 6.3 64bit minimum installation.</p>
<p><span id="more-808"></span>This guide works on the assumption that you have a public facing IP Address of 192.168.10.50 (I know thats not a real public address) and are using an internal network address space of 10.10.10.x/24 with our two web servers on 10.10.10.10 and 10.10.10.15. So we will have two network interfaces on our LoadBalancer eth0 will be set with our real world IP of 192.168.10.50 and eth1 will be set up with 10.10.10.1.</p>
<p>After installing our basic Centos 6.3 64bit OS, it maybe worth running a &#8216;<strong>yum update</strong>&#8216; command first to ensure that the system is fully updated.</p>
<p>As this is a minimum installation you will also need to install a few other packages. These can be installed with the following command:</p>
<p><strong>yum install make wget gcc pcre-static pcre-devel</strong></p>
<p>I&#8217;m using the HAProxy 1.5 dev7 build for this example but at the time of writing dev12 is the latest available build and I&#8217;ll assume that the following will also work with that Development Release. However, to get all the features that we require we will need to build HAProxy from source and not from the package repository. The following steps enable us to do just that:</p>
<ul>
<li><strong>wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev7.tar.gz</strong></li>
<li><strong>tar -zxf haproxy-1.5-dev7.tar.gz</strong></li>
<li><strong>cd haproxy-1.5-dev7</strong></li>
<li><strong>make TARGET=linux26 USE_STATIC_PCRE=1 USE_LINUX_TPROXY=1</strong></li>
<li><strong>cp haproxy /usr/bin/haproxy</strong></li>
<li><strong>cp examples/haproxy.cfg /etc/haproxy.cfg</strong></li>
</ul>
<p>The installation is now completed. However, we have only an example configuration file installed at &#8216;/etc/haproxy.cfg&#8217; this is the file that will store all of the settings that we require to ensure our website is available for the maximum number of visitors. So we now need to edit this configuration file I&#8217;m going to use &#8216;vim&#8217; but if you are more familiar with &#8216;nano&#8217;, &#8216;ee&#8217; or another editor please use that.</p>
<p><strong>vim /etc/haproxy.cfg</strong></p>
<p>Have a quick look through the file if you wish and see the basic structure of the configuration file, we are going to create a VERY basic config to start with just to make sure that our installation is working.</p>
<blockquote><p><em> global<br />
daemon<br />
log /dev/log local4<br />
maxconn 40000<br />
ulimit-n 81000</em></p>
<p><em>defaults<br />
log global<br />
contimeout 4000<br />
clitimeout 42000<br />
srvtimeout 43000</em></p>
<p><em>listen http1<br />
bind 192.168.10.50:80<br />
mode http<br />
balance roundrobin<br />
server http1_1 10.10.10.10:80 cookie http1_1 check inter 2000 rise 2 fall 3<br />
server http1_2 10.10.10.15:80 cookie http1_2 check inter 2000 rise 2 fall 3</em></p></blockquote>
<p>Save the above configuration file and then to start the HAProxy service use the following command from the command line:</p>
<p><strong>/usr/sbin/haproxy -f /etc/haproxy.cfg</strong></p>
<p>If everything starts correctly you should be able to browse to your real IP Address using a different compute and see you default page, as mine are just two Debian Web Server I get the following:</p>
<p style="text-align: center;"><a href="http://blog.loadbalancer.org/wp-content/uploads/2012/11/websvr1.jpg"><img class="size-full wp-image-809   aligncenter" title="websvr1" src="http://blog.loadbalancer.org/wp-content/uploads/2012/11/websvr1.jpg" alt="" width="216" height="193" /></a></p>
<p>If you see the above image or the page for your servers. Congratulations your two web servers are now in High Availability mode. If you do not see your default page stop HAProxy with a <strong>killall haproxy</strong> command and run <strong>/usr/bin/haproxy -d -f /etc/haproxy.cfg</strong> this will restart HAProxy with debugging displayed on the console screen to stop the debug info being printed and the HAProxy Service simply press <strong>Crtl+C</strong></p>
<p>Now that the basic High Availability is working lets move to Transparent mode.</p>
<p>So with a stopped HAProxy service open your /etc/haproxy.cfg file again with your editor of choice and in the &#8216;listen http1 section&#8217; add the following</p>
<blockquote><p><em>option http-server-close<br />
option forwardfor<br />
source 0.0.0.0 usesrc clientip</em></p></blockquote>
<p>You will now need to edit your iptables rules. I have this as my &#8216;iptables-rules.sh&#8217; file:</p>
<blockquote><p><em>iptables -t mangle -N DIVERT<br />
iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT<br />
iptables -t mangle -A DIVERT -j MARK &#8211;set-mark 111<br />
iptables -t mangle -A DIVERT -j ACCEPT<br />
ip rule add fwmark 111 lookup 100<br />
ip route add local 0.0.0.0/0 dev lo table 100</em></p></blockquote>
<p>If you now run this file and then start your new modified HAProxy file and retest to your web server on the Real IP Address you should be able to see in the HTTP Access logs that the address that your site was visited from is not that of the LoadBalancer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/setting-up-haproxy-with-transparent-mode-on-centos-6-x/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Loadbalancing an internal webserver behind two Microsoft TMG 2010 servers at layer4 using DR mode</title>
		<link>http://blog.loadbalancer.org/loadbalancing-an-internal-webserver-behind-two-microsoft-tmg-2010-servers-at-layer4/</link>
		<comments>http://blog.loadbalancer.org/loadbalancing-an-internal-webserver-behind-two-microsoft-tmg-2010-servers-at-layer4/#comments</comments>
		<pubDate>Wed, 12 Sep 2012 12:34:35 +0000</pubDate>
		<dc:creator>Mathew.Levett</dc:creator>
				<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[LVS]]></category>
		<category><![CDATA[Web Proxy]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=698</guid>
		<description><![CDATA[We were looking at Microsoft&#8217;s new TMG server and loadbalancing and after a search of the web found there was not really any Guide on how to loadbalance incoming web connections via two TMG servers to an internal NAT&#8217;ed web sever at layer4. The TMG servers are effectivley acting as WAFs (Web Application Firewalls) for [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">We were looking at Microsoft&#8217;s new TMG server and loadbalancing and after a search of the web found there was not really any Guide on how to loadbalance incoming web connections via two TMG servers to an internal NAT&#8217;ed web sever at layer4.<br />
The TMG servers are effectivley acting as WAFs (Web Application Firewalls) for the incomming traffic.<br />
They require the traffic to be transparent (so they can inspect the client source IP address), so layer 4  DR mode is a logical choice.</p>
<p style="text-align: left;">The main problems were getting the required loopback adapter on the TMG servers to function correctly</p>
<p style="text-align: left;">So this is how we got it to work.</p>
<p style="text-align: left;"><strong><span style="color: #ff0000;">Please note this is not a guide on how to loadbalance your firewalls for outbound connections where the TMG servers are acting as a reverse proxy / web filter aka. squid (allthough it would be very similar and that can be discussed in another blog)<br />
</span></strong></p>
<p style="text-align: left;">The Network we will build will look like the following where we are loadbalancing the connections between the two TMG servers via a loadbalancer, this is then sent from the TMG Server to the WebServer via a NAT rule.</p>
<p style="text-align: center;"><img class="wp-image-789 aligncenter" title="Diagram1" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/Diagram1.png" width="454" height="233" /></p>
<p style="text-align: left;"><span id="more-698"></span></p>
<p style="text-align: left;">The first step is to Add the loopback adaptors to the TMG servers, this process should be quite trivial but can not be done from the TMG snap-in so here is the instructions step by step.</p>
<p style="text-align: left;">1. Add Loopback Adapter to the TMG server.<br />
This needs to be done via the Device Manager &#8211; Add Legacy Hardware option</p>
<p style="text-align: center;"><img class=" wp-image-699 aligncenter" title="1" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/1.png" /></p>
<p style="text-align: left;">2. Follow the Wizard</p>
<p style="text-align: center;"><img class=" wp-image-701 aligncenter" title="2" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/21.png" /></p>
<p style="text-align: left;">3.  Select Manual</p>
<p style="text-align: center;"><a href="http://blog.loadbalancer.org/wp-content/uploads/2012/09/3.png"><img class=" wp-image-703 aligncenter" title="3" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/3.png" /></a></p>
<p style="text-align: left;">4. Select Microsoft Loopback Adaptor</p>
<p style="text-align: center;"><a href="http://blog.loadbalancer.org/wp-content/uploads/2012/09/5.png"><img class=" wp-image-707 aligncenter" title="5" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/5.png" /></a></p>
<p style="text-align: left;">5. Once installed, edit the IP address of the loopback Adaptor and remove any unneeded services</p>
<p style="text-align: center;"><img class=" wp-image-712 aligncenter" title="9" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/9.png" width="365" height="459" /></p>
<p style="text-align: left;">6. Assigned the VIP address to the Loopback, the subnet mask should be a /32 (this can be edited in TMG but it does not allow a /32 there so we do it here)</p>
<p style="text-align: center;"><img class=" wp-image-713 aligncenter" title="10" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/10.png" width="405" height="446" /></p>
<p style="text-align: left;"><strong>8. TMG does not find this interface right away so a reboot of the TMG server is needed.</strong></p>
<p style="text-align: left;">9. We now need to create a network Object for the new Adaptor, to do this we do the following</p>
<p style="text-align: left;">Access the TMG Snap-in</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-719" title="1" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/11.png" width="1024" height="766" /></p>
<p style="text-align: left;">10. Click on Toolbox on the right hand side, then Network objects, once their right click on Networks, and then New Network&#8230;</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-722" title="11" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/111.png" width="1025" height="601" /></p>
<p style="text-align: left;">11. Name the new Network</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-723" title="12" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/12.png" width="500" height="392" /></p>
<p style="text-align: left;">12. Select Perimeter for the network type, as this will be internet facing</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-768" title="13" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/13.png" width="503" height="394" /></p>
<p style="text-align: left;">13.  Now we add the ip assigned, so click on Add Adaptor and add the loopback.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-725" title="14" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/14.png" width="495" height="383" /></p>
<p style="text-align: center;"><img class="aligncenter  wp-image-727" title="15" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/15.png" width="435" height="429" /></p>
<p style="text-align: left;">You should then be left with this</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-728" title="16" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/16.png" width="500" height="397" /></p>
<p style="text-align: left;">14. click finish</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-729" title="17" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/17.png" width="500" height="394" /></p>
<p style="text-align: left;">15. Apply the change</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-730" title="18" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/18.png" width="1024" height="672" /></p>
<p style="text-align: left;">Next we need to setup the Network Rules to allow the the traffic to traverse the loopback</p>
<p style="text-align: left;">16. Click on Networks, then Network Rules</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-735" title="2" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/22.png" width="1026" height="350" /></p>
<p style="text-align: left;">17. Click on Create a Network Rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-736" title="3" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/32.png" width="499" height="381" /></p>
<p style="text-align: left;">18. Add the traffic sources</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-737" title="4" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/41.png" width="499" height="383" /></p>
<p style="text-align: left;">19. Add a destination</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-738" title="5" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/51.png" width="503" height="384" /></p>
<p style="text-align: left;">20. Set the Network Relationship to NAT</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-739" title="6" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/61.png" width="498" height="379" /></p>
<p style="text-align: left;">21. Leave the IP selection as default</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-740" title="7" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/71.png" width="501" height="385" /></p>
<p style="text-align: left;">22. Thats it for the Network Rules</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-741" title="8" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/81.png" width="498" height="383" /></p>
<p style="text-align: left;">Now apply the settings.</p>
<p style="text-align: left;">Next we need to configure the Firewall Rules and Listener</p>
<p style="text-align: left;">23. Go to Firewall Policy</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-742" title="9" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/91.png" width="1026" height="636" /></p>
<p style="text-align: left;">23. Click Publish Web Site, and name the new Rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-743" title="1" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/19.png" width="500" height="485" />24. Allow the connections</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-745" title="2" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/23.png" width="504" height="487" /></p>
<p style="text-align: left;">24. Now select what you would like to publish in my case its a single IIS site running on the DC (this is a test lab, in a production setup it would be its own server)</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-746" title="4" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/42.png" width="501" height="483" /></p>
<p style="text-align: left;">25. Select HTTP (you can use HTTPS but in my lab its just http)</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-747" title="5" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/52.png" /></p>
<p style="text-align: left;">26. Enter the server that is hosting the Site, in my lab its the DC</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-748" title="6" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/62.png" /></p>
<p style="text-align: left;">27. Next is the path. i left this as default</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-749" title="7" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/72.png" /></p>
<p style="text-align: left;">28. next setup the URLs to be accepted, I set this to allow all.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-750" title="8" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/82.png" /></p>
<p style="text-align: left;">29. Now we configure a Web Listner, so click on new</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-751" title="9" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/92.png" /></p>
<p style="text-align: left;">30. Now name your new listen, I called mine IIS &#8211; Ext and Loopback as it will listen to Ext and Loopback networks</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-752" title="10" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/101.png" /></p>
<p style="text-align: left;">31. Select HTTP so this will listen for HTTP traffic</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-753" title="11" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/112.png" /></p>
<p style="text-align: left;">32. Next Select the networks that the listner should listen on.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-755" title="12" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/121.png" /></p>
<p style="text-align: left;">33. Set the Auth as required, I use No Auth in my example</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-756" title="13" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/131.png" /></p>
<p style="text-align: left;">34. Next SSO if you use it, I dont</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-757" title="14" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/141.png" /></p>
<p style="text-align: left;">35. That is all for the Listener</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-758" title="15" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/151.png" /></p>
<p style="text-align: left;">36. your listener box should now look like this</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-759" title="16" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/161.png" /></p>
<p style="text-align: left;">37. Leave the Auth Delegation as defaults.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-760" title="18" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/181.png" /></p>
<p style="text-align: left;">38.  Set the users who can access this, I left it as default</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-761" title="19" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/191.png" /></p>
<p style="text-align: left;">39. That should be it for the rules.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-762" title="20" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/20.png" /></p>
<p style="text-align: left;">40. Apply the new settings</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-763" title="21" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/211.png" /></p>
<p style="text-align: left;">41. now we need to setup a rule to allow External Traffic to the Loopback via the firewall, so add a new access rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-770" title="22" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/221.png" /></p>
<p style="text-align: left;">42. Allow the Rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-771" title="23" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/231.png" /></p>
<p style="text-align: left;">43. Add the correct protocols</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-772" title="24" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/24.png" /></p>
<p style="text-align: left;">44.  Enable Malware Scanning</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-773" title="25" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/25.png" /></p>
<p style="text-align: left;">45.  Select the External as source network</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-774" title="26" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/26.png" /></p>
<p style="text-align: left;">46. Select Loopback as the destination network</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-775" title="27" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/27.png" /></p>
<p style="text-align: left;">47. Allow all users access to this rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-776" title="28" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/28.png" /></p>
<p style="text-align: left;">48. Finalise the rule</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-777" title="29" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/29.png" /></p>
<p style="text-align: left;">49. Apply settings and you should be done</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-778" title="30" alt="" src="http://blog.loadbalancer.org/wp-content/uploads/2012/09/30.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/loadbalancing-an-internal-webserver-behind-two-microsoft-tmg-2010-servers-at-layer4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Load Balancing Exchange 2010 CAS Array with HAProxy (Quick Guide)</title>
		<link>http://blog.loadbalancer.org/load-balancing-exchange-2010-cas-array-with-haproxy/</link>
		<comments>http://blog.loadbalancer.org/load-balancing-exchange-2010-cas-array-with-haproxy/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 13:12:18 +0000</pubDate>
		<dc:creator>Aaron West</dc:creator>
				<category><![CDATA[haproxy]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[Microsoft Exchange]]></category>

		<guid isPermaLink="false">http://blog.loadbalancer.org/?p=610</guid>
		<description><![CDATA[This Blog is for anyone wanting to load balance the Exchange 2010 CAS role using only open source software. In my example I will be starting with a simple Debian net-install and building the HAProxy package from source because I wanted the latest feature set available. I would definitely recommend using a recent 1.5-dev build if following [...]]]></description>
				<content:encoded><![CDATA[<p>This Blog is for anyone wanting to load balance the Exchange 2010 CAS role using only open source software. In my example I will be starting with a simple Debian net-install and building the HAProxy package from source because I wanted the latest feature set available. I would definitely recommend using a recent 1.5-dev build if following this guide or parts of the HAProxy configuration may be incompatible.<br />
<span id="more-610"></span><br />
<BR><strong>Update the system and install dependencies :</strong></p>
<p>1. Update</p>
<pre>root@localhost:~# apt-get update</pre>
<p>2. Install dependencies</p>
<pre>root@localhost:~# apt-get install build-essential make libpcre3 libpcre3-dev</pre>
<p><BR><strong>Downloading/Building the HAProxy package :</strong></p>
<p>1. Download the HAProxy Package available from <a href="http://haproxy.1wt.eu/">http://haproxy.1wt.eu</a></p>
<pre>root@localhost:~# wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev11.tar.gz</pre>
<p>2. Extract the package</p>
<pre>root@localhost:~# tar -xvzf haproxy-1.5-dev11.tar.gz</pre>
<p>3. Change directory and make the package</p>
<pre>root@localhost:~# cd haproxy-1.5-dev11</pre>
<pre>root@localhost:~/haproxy-1.5-dev11# make TARGET=linux2628 ARCH=x86_64 USE_PCRE=1</pre>
<p>4. Install the newly compiled package and confirm it is installed.</p>
<pre>root@localhost:~/haproxy-1.5-dev11# make install
root@localhost:~/haproxy-1.5-dev11# /usr/local/sbin/haproxy -vv</pre>
<p>Assuming you didn&#8217;t run into any errors with the previous commands you should now have HAProxy installed.</p>
<p><strong><br />
Configuring startup script :</strong></p>
<p>1. Create the startup script</p>
<pre>root@localhost:~/haproxy-1.5-dev11# nano -w /etc/init.d/haproxy</pre>
<p>2. Paste the following into the new file and save it(with Ctrl+X)</p>
<pre>#!/bin/sh
# /etc/init.d/haproxy

PATH=/bin:/usr/bin:/sbin:/usr/sbin

pidfile=/var/run/haproxy.pid
binpath=/usr/local/sbin/haproxy
options="-f /etc/haproxy/haproxy.cfg"

test -x $binpath || exit 0

case "$1" in
  start)
    echo -n "Starting HAproxy"
        $binpath $options
    #start-stop-daemon --start --quiet --exec $binpath -- $options
    echo "."
    ;;
  stop)
    echo -n "Stopping HAproxy"
    kill `cat $pidfile`
        #start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
    echo "."
    ;;
  restart)
    echo -n "Restarting HAproxy"
    #start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
    kill `cat $pidfile`
        sleep 1
    $binpath $options
    echo "."
    ;;
  *)
    echo "Usage: /etc/init.d/haproxy {start|stop|restart}"
    exit 1
esac

exit 0</pre>
<p>3. Change permissions and register the startup script</p>
<pre>root@localhost:~/haproxy-1.5-dev11# cd /etc/init.d
root@localhost:~/etc/init.d# chmod +x haproxy
root@localhost:~/etc/init.d# update-rc.d haproxy defaults</pre>
<p>You should now be able to start and stop haproxy with “service haproxy &lt;action&gt;” where the action is start/stop/restart.</p>
<p><strong><br />
Creating the HAProxy configuration file :</strong></p>
<p>1. Create folder structure and open the config file for editing</p>
<pre>root@localhost:~/etc/init.d# mkdir /etc/haproxy
root@localhost:~/etc/init.d# nano -w /etc/haproxy/haproxy.cfg</pre>
<p>2. Paste in the example configuration and adapt for your settings. </p>
<p>N.B. The bind lines below can be adapted to listen on a specific IP address, simply add your desired local IP: bind 192.168.72.120:135,192.168.72.120:60200,192.168.72.120:60201 </p>
<pre>global
 daemon
 stats socket /var/run/haproxy.stat mode 600 level admin
 pidfile /var/run/haproxy.pid
 maxconn 40000
 ulimit-n 81000
 defaults
 mode http
 balance roundrobin
 timeout connect 4000
 timeout client 86400000
 timeout server 86400000</pre>
<pre>frontend CAS-RPC
 bind :135,:60200,:60201
 mode tcp
 maxconn 40000
 default_backend CAS-RPC-SERVERS</pre>
<pre>frontend CAS-WEB
 bind :80,:443
 mode tcp
 maxconn 40000
 default_backend CAS-WEB-SERVERS</pre>
<pre>frontend HT-SMTP
 bind :25
 mode tcp
 maxconn 40000
 default_backend HT-SERVERS</pre>
<pre>backend CAS-RPC-SERVERS
 stick-table type ip size 10240k expire 60m
 stick on src
 option redispatch
 option abortonclose
 balance leastconn
 server EXCH01 192.168.72.222 weight 1 check port 135 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions
 server EXCH02 192.168.72.223 weight 1 check port 135 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions</pre>
<pre>backend CAS-WEB-SERVERS
 stick-table type ip size 10240k expire 60m
 stick on src
 option redispatch
 option abortonclose
 balance leastconn
 server EXCH01 192.168.72.222 weight 1 check port 443 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions
 server EXCH02 192.168.72.223 weight 1 check port 443 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions</pre>
<pre>backend HT-SERVERS
 option redispatch
 option abortonclose
 balance leastconn
 server EXCH01 192.168.72.222 weight 1 check port 25 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions
 server EXCH02 192.168.72.223 weight 1 check port 25 inter 2000 rise 2 fall 3 on-marked-down shutdown-sessions</pre>
<pre>listen stats :7777
 stats enable
 stats uri /
 option httpclose
 stats admin if TRUE
 stats auth admin:password</pre>
<p>3. Start HAProxy with your new configuration</p>
<pre>root@localhost:~/etc/init.d# service haproxy start</pre>
<p>N.B. At this stage if you receive errors like below please check that something else is not listening on any of the required ports.</p>
<pre>[ALERT] 205/123152 (2839) : Starting proxy CAS: cannot bind socket [192.168.72.120:135]</pre>
<p>You now also have a WUI in the form of the HAProxy stats page which includes useful options such as taking a server offline etc.</p>
<pre>http://&lt;IP-ADDRESS&gt;:7777/</pre>
<p><strong><br />
Configuring the Exchange 2010 CAS role :</strong></p>
<p>1. Either configure the ports manually or using the following Registry file(user beware)</p>
<p>Link to the Registry file = <a href="http://downloads.loadbalancer.org/RPC%20Ports.reg">http://downloads.loadbalancer.org/RPC%20Ports.reg</a></p>
<p>Manual Static Port Configuration</p>
<p>To set a static port for the RPC Client Access Service, open the registry on each CAS and navigate to:</p>
<p>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesMSExchangeRPC</p>
<p>Here, you need to create a new key named ParametersSystem, and under this key create a new DWORD(32-bit) Value named TCP/IP Port as shown below. The Value for the DWORD should be the port number you want to use. Microsoft recommends you set this to a unique value between 59531 and 60554 and use the same value on all CAS. In this Blog the port used is 60200.</p>
<p>N.B. Make sure you use a DWORD Value for this key</p>
<p><img src="https://lh3.googleusercontent.com/JD02W0lWyGUvoJYN8dA2e-WSVI3nJ-pyK1QYrqd7VVyMtZZ8nqe-drXta6c4q9cdBIMrLbHpC8NQXVjmDAzzf5AJdI5cAT0A6U2qlDXCUePtnDJpCiw" alt="" width="683px;" height="94px;" /><br />
<BR><br />
To set a static port for the Address Book Service, open the registry on each CAS and navigate to:</p>
<p>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesMSExchangeAB</p>
<p>Here, you need to create a new key named Parameters, and under this key create a new String Value named RpcTcpPort as shown below. Microsoft recommends you set this to a unique value between 59531 and 60554 and use the same value on all CAS. In this Blog the port used is 60201.</p>
<p>N.B. Make sure you use a STRING Value for this key</p>
<p><img src="https://lh3.googleusercontent.com/abIfqahdqbYrOe-nvfN2rNiD-PJo7Wn-RlrJfhM620dNuBNSH7AVeBWelpUkelhptR77IYIaa8QrmKgZ-FEHPFlBW6AQ4EwJBt4vsIqPddOlBLaWR0s" alt="" width="683px;" height="124px;" /><br />
<BR><br />
2. Creating the DNS entry</p>
<p>Create a DNS record for the CAS Array, this should be the same as the load balancer&#8217;s IP address(bind address if used earlier), e.g. cas.domain.com<br />
<strong><img src="https://lh4.googleusercontent.com/mPM_S3qjqklLf0KsLwTZxByv_sLH4rotNxVKJmAkKb5jXgaujOIDz5qztPY8tNe0xVsDHSIeEejY8wze8qROOelj315MSZjU1pR-l6IP1RfZxebn584" alt="" width="733px;" height="227px;" /></strong></p>
<p>3. Configure the CAS array object</p>
<p>Use the following command from the Exchange 2010 management shell to create the object :</p>
<pre>New-ClientAccessArray –Name “CAS-array” –FQDN “cas.domain.com” -Site “default-first-site-name”</pre>
<p>N.B. change “default-first-site-name” to the AD site appropriate for your Client Access Servers<br />
N.B. change “cas.domain.com” to the FQDN of the CAS array(same as the DNS entry)</p>
<p>If the mail database already existed before creating the array, you&#8217;ll also need to run the following command to relate the new CAS array to the database:</p>
<pre>Set-MailboxDatabase "NameofDatabase" -RpcClientAccessServer “cas.domain.com”</pre>
<p>To verify the configuration of the CAS array, use the following commands from the Exchange Shell :</p>
<pre>get-ClientAccessServer</pre>
<p>lists the available Client Access Servers</p>
<pre>get-ClientAccessArray</pre>
<p>lists the Client Access Array and its members</p>
<p><strong><br />
Finished</strong></p>
<p>Once you&#8217;ve completed all the previous steps you can now access your CAS services via your load balancer IP, it should also be correctly load balancing connections for better performance and real server resilience. There are still many ways you could build further resilience or add more features to this solution such as HA, DAG’s and SSL Termination but this will still give you perfectly adequate load balancing of the CAS and HT roles.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadbalancer.org/load-balancing-exchange-2010-cas-array-with-haproxy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
