<?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>Load Balancing Digest &#187; Ask Tony</title>
	<atom:link href="http://lbdigest.com/category/ask-tony/feed/" rel="self" type="application/rss+xml" />
	<link>http://lbdigest.com</link>
	<description>Server Load Balancing Articles and News</description>
	<lastBuildDate>Mon, 22 Aug 2011 12:16:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Web Application Firewall: What&#8217;s In A Name?</title>
		<link>http://lbdigest.com/2008/11/12/web-application-firewall-whats-in-a-name/</link>
		<comments>http://lbdigest.com/2008/11/12/web-application-firewall-whats-in-a-name/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 20:27:26 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Notes from the publisher]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=185</guid>
		<description><![CDATA[In my recent review of KEMP&#8217;s new LoadMaster software, which includes Web Application Firewall capabilities, Ofer Shezaf (from breach.com) had this to say in the comments section: Systems supporting only...]]></description>
			<content:encoded><![CDATA[<p>In my recent review of <a href="http://lbdigest.com/2008/08/20/kemp-loadmaster-1500-pre-release-review/#comments">KEMP&#8217;s new LoadMaster software</a>, which includes Web Application Firewall capabilities, Ofer Shezaf (from <a href="http://breach.com">breach.com</a>) had this to say in the comments section:</p>
<blockquote><p>Systems supporting only snort rules and lacking a positive security model are not usually not considered a web application firewall, but rather an intrusion prevention system.</p></blockquote>
<p>Which is an interesting question: What is a Web Application Firewall exactly? How does that differ from an IPS (Intrusion Prevention System), and is there any meaningful distinction between the two?</p>
<p>Amazingly, Wikipedia doesn&#8217;t have an exact definition for Web Application Firewall (just Application Firewalls, but that&#8217;s something a bit different).Â  But <a href="http://www.owasp.org/index.php/Web_Application_Firewall">here&#8217;s</a> the definition of &#8220;Web Application Firewall&#8221; according to <a href="http://www.owasp.org">OWASP</a>:</p>
<blockquote><p>A web application firewall (WAF) is an appliance, server plugin, or filter that applies a set of rules to an HTTP conversation. Generally, these rules cover common attacks such as <a title="Cross-site Scripting (XSS)" href="http://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29">Cross-site Scripting (XSS)</a> and <a title="SQL Injection" href="http://www.owasp.org/index.php/SQL_Injection">SQL Injection</a>. By customizing the rules to your application, many attacks can be identified and blocked.</p></blockquote>
<p>I think the KEMP box qualifies, but the range of devices that qualify are vast.Â  While the KEMP box has WAF capabilities, it&#8217;s clearly an entry level box ($2,500) while the Breach box is higher end.Â  It&#8217;s like the difference between the KEMP LoadMaster and F5&#8242;s LTM/BIG-IP: They&#8217;re both Application Delivery Controllers, but they&#8217;re clearly not in the same league or market.Â  And that&#8217;s fine, if all we had were high-end load balancers, the SMB would be squeezed out.Â  I&#8217;ve not tested a Breach box, but I wouldn&#8217;t doubt that they offer superior protection.Â  It&#8217;s just a matter of whether the customer can afford it.Â  The world needs BMWs as well as Camrys.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/11/12/web-application-firewall-whats-in-a-name/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mega Proxy Not So Mega, Akshually</title>
		<link>http://lbdigest.com/2008/09/15/mega-proxy-not-so-mega-akshually/</link>
		<comments>http://lbdigest.com/2008/09/15/mega-proxy-not-so-mega-akshually/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 16:53:33 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=177</guid>
		<description><![CDATA[Apologies for the LOLcatspeak.Â  I&#8217;m incapable of helping myself. The driving force behind Layer 7 persistence (keeping an individual user tied to a specific server in a server group based...]]></description>
			<content:encoded><![CDATA[<p>Apologies for the LOLcatspeak.Â  I&#8217;m incapable of helping myself.</p>
<p>The driving force behind Layer 7 persistence (keeping an individual user tied to a specific server in a server group based on HTTP headers instead of IP address) was the dreaded AOL Megaproxy issue.Â  AOL had the nasty little tendancy of routing all web traffic through a couple of mega proxies located throughout the US and Canada.</p>
<p>This caused a problem with the previous method of persistence, which was to base it on source IP address. Typically, one IP address equaled a single user.Â  However, with AOL, you could have 20,000 users coming from a single IP address.Â  The load balancer would think it&#8217;s a single user, and if you had 300 servers ready to take orders, all 20,000 users would go to one.Â  That situation has happened a few times, and it&#8217;s hillarious, so long as you aren&#8217;t the company with the 300 servers.</p>
<p>I still teach that mega proxy problem, mostly out of muscle memory.Â  But I stopped to think about it, do we really have a problem with megaproxies anymore?Â  Does AOL even do this practice, and even if they did, is AOL represent a significant amount of traffic?</p>
<p>The answer to the later question is almost certainly no.Â  AOL has seen a dramatic drop in subscribers, and most people connect directly to the Internet through their cable modem or DSL provider.Â  And I don&#8217;t know of any major Internet provider that utilizes proxies for their users Internet requests.</p>
<p>Layer 7 persistence is still applicable to situations where you may have multiple users coming from a single IP address (such as a small client base coming from a handful of offices, with each office using on public IP address), but I wonder what doing Layer 4 persistence would do to a major site these days.Â  I&#8217;m thinking, not much.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/09/15/mega-proxy-not-so-mega-akshually/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>New Survey</title>
		<link>http://lbdigest.com/2008/06/16/new-survey/</link>
		<comments>http://lbdigest.com/2008/06/16/new-survey/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 15:24:50 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Feature Articles]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=152</guid>
		<description><![CDATA[It&#8217;s been about 6 months since the last load balancing/application delivery survey, so I think it&#8217;s high time we did another one. So here&#8217;s your chance to contribute to the...]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been about 6 months since the last <a href="http://lbdigest.com/?s=survey">load balancing/application delivery survey</a>, so I think it&#8217;s high time we did another one.</p>
<p>So here&#8217;s your chance to contribute to the questions:Â  What do you want to know?Â  Put your suggestions in the comments section below, or email them to tony at lbdigest dawt com.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/06/16/new-survey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco CSS Replacements</title>
		<link>http://lbdigest.com/2008/02/12/cisco-css-replacements/</link>
		<comments>http://lbdigest.com/2008/02/12/cisco-css-replacements/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 17:57:49 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Buyer's Guide]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2008/02/12/cisco-css-replacements/</guid>
		<description><![CDATA[There was a post today on the lb-l mailing list asking about alternatives to Cisco&#8217;s CSS. This is part of a trend I&#8217;ve noticed lately, where people who have an...]]></description>
			<content:encoded><![CDATA[<p>There was a post today on the <a href="http://vegan.net/lb/archive/02-2008/0006.html">lb-l mailing list</a> asking about alternatives to Cisco&#8217;s CSS.  This is part of a trend I&#8217;ve noticed lately, where people who have an existing Cisco CSS installation are looking to replace that gear with new gear.</p>
<p>Cisco CSS users specifically have an interesting choice when it comes to choosing a new product:  They can take the high road, or they can take the low road.</p>
<p>Feature-wise, the Cisco CSS is roughly in parity with much of the value market (KEMP, Barracuda, Coyote Point).  If a site is looking to keep the same level of functionality along with saving a ton of cash, then the value market may be the way to go.</p>
<p>More advanced load balancers, such as F5&#8242;s BIG-IP, A10 networks, and of course, Cisco&#8217;s ACE platform, offer a lot more features than the CSS. F5 for example offers their iRule platform, which allows the load balancer to do some pretty sophisticated app-level functions (such as authentication) before ever hitting an application.Â  They all offer a more flexible network implementation, with multiple in-bound and out-bound routes.Â  Of course, the prices are significantly more than the value market products.</p>
<p>The good news is, if you&#8217;re looking to replace your Cisco CSS load balancers, there are over a dozen appropriate vendors that can replace your infrastructure while giving you similar functionality.Â  The bad news is, there is over a dozen vendors to choose from.Â  So don&#8217;t be afraid to get picky, and start looking into either saving a lot of money, or getting a lot more features.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/02/12/cisco-css-replacements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshoot Any Load Balancing Ailment: End-to-End Connectivity</title>
		<link>http://lbdigest.com/2007/12/20/troubleshoot-any-load-balancing-ailment-end-to-end-connectivity/</link>
		<comments>http://lbdigest.com/2007/12/20/troubleshoot-any-load-balancing-ailment-end-to-end-connectivity/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 21:24:37 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/12/20/troubleshoot-any-load-balancing-ailment-end-to-end-connectivity/</guid>
		<description><![CDATA[You&#8217;re stumped. There&#8217;s a problem with your infrastructure, and you&#8217;re not positive what it is. You checked a few things out, but the symptoms befuddle you. You&#8217;re pretty sure it&#8217;s...]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re stumped.  There&#8217;s a problem with your infrastructure, and you&#8217;re not positive what it is.  You checked a few things out, but the symptoms befuddle you.  You&#8217;re pretty sure it&#8217;s not the load balancer, but everyone is pointing at you, and you&#8217;ve got no proof.</p>
<p>What do you do?</p>
<p>I&#8217;ve been in that situation so many times, I&#8217;ve developed a relatively quick checklist process that can quickly be performed.  This check list has a couple of benefits:</p>
<ul>
<li>It&#8217;s methodical and process-based, so it can pick up both the obvious and the oddity</li>
<li>When working in an environment where there are different groups responsible for different aspects of the infrastructure, this provides clear demarcation for them and helps with interaction</li>
<li>If the problem lies with the load balancer, this troubleshooting will point to the problem in about 90% of the cases</li>
<li>If the problem lies elsewhere, this troubleshooting will provide hard evidence to back up that claim</li>
</ul>
<p>The heart of this check list is the 4-step process basic to all load balancing:</p>
<p style="text-align: center"><a href="../wp-content/uploads/2007/12/4step.png" title="4step.png"><img src="/wp-content/uploads/2007/12/4step.png" title="4 step process" alt="4 step process" height="330" width="208" /><br />
</a></p>
<p style="text-align: center"><a href="../wp-content/uploads/2007/12/4step.png" title="4step.png"> </a></p>
<p align="center"> <em>The 4-step process, basic to all load balancing<br />
</em></p>
<p>This process starts at the beginning, from the clients perspective, and moves through the entire connection from end-to-end, testing to make sure everything is hunky dory along the way.</p>
<ul>
<li>Make sure the load balancer sees the connection</li>
<li>Determine how the load balancer handles incoming connections (Layer 4 or Layer 7)</li>
<li>Check connectivity from the load balancer to the server</li>
</ul>
<p>Going through the list, if you find a problem, you resolve the problem before you continue on.  There may be other problems, but you&#8217;ll need to address the first problem you encounter first before moving on, otherwise there will be too many variables.</p>
<p>This check list is particularly useful in situations where you don&#8217;t have access to all of the equipment on the network, such as large enterprise situations where separate groups are responsible for areas like firewalls, network routing, switch infrastructure, and servers.</p>
<p><em><strong>Prepping for the Check List</strong></em></p>
<p>The two tools you&#8217;ll need to run through this checklist are telnet, openssl, and tcpdump (or some other network sniffer).  It&#8217;s best if you use use tcpdump on the load balancer itself (which is included in most load balancers), but if that&#8217;s not possible, setup a network tap of some sort.  For this checklist, we&#8217;ll assume you&#8217;re using a load balancer with tcpdump.</p>
<p><em><strong>Step #1: Confirm that the connection is reaching the load balancer</strong></em></p>
<p>Step 1 is to simply ensure that connections are going to where they are supposed to go.  While this is obvious if you&#8217;re in a situation where the connection times out, this also works when you get a definate reaction (connection accepted/connection refused), this at least proves that the load balancer is the one sending the response, and not some other device.</p>
<p>In this test, we&#8217;re only concerned with whether the connection is reaching the load balancer, step 1 in the diagram above.  To do this, run TCP dump on the load balancer with the following attributes:</p>
<p><code>tcpdump -i [interface] -n host [ip address of virtual] and port [port of virtual]</code></p>
<p>Then telnet to the IP and port of the virtual service on the load balancer.  If you&#8217;re doing SSL termination at the load balancer, use telnet anyway, as we&#8217;re just testing for a valid TCP connection.   It&#8217;s best that you do this from a subnet that is not the virtual service, so as to eliminate routing issues.</p>
<p>You can try ping, but it really doesn&#8217;t tell us anything.  For one, ICMP is not the protocol we&#8217;re concerned with.  Firewall rules also may block ICMP and not TCP, or it may block TCP and not ICMP.  Either way, telnet works much better because on a TCP level and mimics a connection from a browser.</p>
<p>Typically one of three things will happen:</p>
<ul>
<li>Connection refused</li>
<li>Nothing connects, and the operation times out</li>
<li>A connection is made</li>
</ul>
<p>What we&#8217;re looking for is to see if the load balancer sees the attempted incoming connection.  If the load balancer doesn&#8217;t see the incoming connection, it may be a routing issue (either Layer 3 or even Layer 2) or it may be that a firewall rule is blocking the connection.</p>
<p>In any event, if you&#8217;re not seeing the connection, stop at this step, and figure out why.  If you&#8217;re dealing with different networking groups, you can bring this tcpdump information to them and they&#8217;ll have something substantive to go on.</p>
<p>If you do see the incoming connection, move on to the next step.</p>
<p><em><strong>Step #2: How Is The Load Balancer Handling The Connection?</strong></em></p>
<p>As mentioned in a previous blog entry, load balancers exhibit different behavior depending on whether or not the virtual service is configured for <a href="http://lbdigest.com/2007/12/16/think-youre-connected-think-again/">Layer 4 or Layer 7</a>.   A layer 4-configured virtual service will not complete a TCP connection unless a connection all the way through to a real server.   In a Layer 7-configured virtual service, as long as you can reach the IP and port of the load balancer, you&#8217;ll probably get an established TCP connection (although some load balancers allow you to change this behavior).</p>
<p>Most load balancers don&#8217;t tell you explicitly whether or not you&#8217;re running in Layer 4 or Layer 7 mode.  They switch between one or the other automatically depending on how you configure the virtual service.  Only one load balancer that I know of tells you (KEMP Technologies). With others however, you&#8217;re left to pretty much deduce this on your own.</p>
<p>So how do you tell?  It depends on the vendor, but generally if you&#8217;re using any type of cookie persistence, SSL termination, content rules, or programming language on the load balancer, you&#8217;re in Layer 7.   In F5&#8242;s BIG-IP V9, when you set up a virtual server, there are a few options on the type of virtual server to setup.</p>
<p><a href="http://lbdigest.com/wp-content/uploads/2007/12/l4vsl7.png" title="L4 vs L7"></a></p>
<p style="text-align: center"><a href="http://lbdigest.com/wp-content/uploads/2007/12/l4vsl7.png" title="L4 vs L7"><img src="http://lbdigest.com/wp-content/uploads/2007/12/l4vsl7.png" alt="L4 vs L7" /></a></p>
<p>Standard and Performance HTTP are Layer 7 configurations, while the others are Layer 4-limited.</p>
<p>So what happens when you try to connect to a <em>Layer 7</em> virtual service that has connectivity problems with real servers on the back end?</p>
<p>First, the connection will be accepted:</p>
<pre>system1&gt; telnet 192.168.0.200 80</pre>
<pre>Trying 192.168.0.200...</pre>
<pre>Connected to testvip (192.168.0.200).</pre>
<pre>Escape character is '^]'.</pre>
<p>A valid TCP connection has been established.  If you&#8217;re troubleshooting and you get this, you may assume that the device you&#8217;ve connected to is the server.  But this is not the case.  You never directly connect to the server when the load balancer operates in Layer 7.  In this example, there are no real servers that are on line.  The BIG-IP shows all available servers as unavailable.  Yet I was still able to make a connection.</p>
<p>Now I&#8217;ll do a simple &#8220;GET /&#8221;.  What happens with this &#8220;GET /&#8221; depends on the vendor, and even on the version.  Take for the example BIG-IP Version 4 and BIG-IP Version 9.</p>
<p>With version 9, this happens:</p>
<pre>GET /</pre>
<p>As soon as I hit &lt;Enter&gt;, the connection is closed by the BIG-IP sending a reset packet.</p>
<pre>Connection closed by foreign host.</pre>
<pre></pre>
<pre>13:37:36.679409 192.168.0.200:80 &gt; 192.168.2.2.33962: <font color="red">R</font> 1:1(0) ack 7 win 4387 (DF)</pre>
<p>With BIG-IP version 4, there is a different behavior.   It will hang out for a while, before sending the reset.  This can make you think that the web server is hanging, but again, what is happening is that the server.</p>
<p><em><strong>Step #3: Connectivity From The Load Balancer To The Server</strong></em></p>
<p>First off, perform some sort of test to see if the real servers are even operational.  Open up a browser and plug the IP address (and port) and see if you can bring up a site.  If that doesn&#8217;t work, or if the server is a non-HTTP protocol, use telnet to see if you can get a TCP connection.  If you can&#8217;t, you may want to figure out why.  If the servers aren&#8217;t responding, you&#8217;re obviously not going to get far with a load balancer.</p>
<p>If you can get to the servers, log onto the load balancer and telnet from the load balancer to the real server on the port configured.  Try connecting to at least one of the servers in a multi-server group.</p>
<p><code>&gt; telnet 10.0.0.100 80</code></p>
<p>Again, one of three things will likely happen:</p>
<ul>
<li>You&#8217;ll get a valid TCP connection.  If this occurs, try to make an HTTP request.  A simple &#8220;GET /&#8221; and &lt;enter&gt;&lt;enter&gt; (hit enter twice) should suffice to get some sort of response.  As long as you get some sort of response, that&#8217;s good.</li>
<li>You&#8217;ll get a connection refused.  If you&#8217;re getting connection refused, it&#8217;s either because a firewall is blocking you, or the server isn&#8217;t answered.</li>
<li>Your connection will time out.  For whatever reason, packets aren&#8217;t getting to the server.  This can either be a firewalling issue, or some other routing issue. If you&#8217;ve got access to run tcpdump or other type of network trace on the server, see if you can see the incoming connection from the load balancer.</li>
</ul>
<p>After running these tests, you should have a much better picture on what&#8217;s going on with your network.  If the issue was caused by the load balancer, this would probably have spotted the root cause.  If it wasn&#8217;t the load balancer, then you&#8217;ve got evidence to prove that it&#8217;s not.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/12/20/troubleshoot-any-load-balancing-ailment-end-to-end-connectivity/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Think You&#8217;re Connected?  Think Again</title>
		<link>http://lbdigest.com/2007/12/16/think-youre-connected-think-again/</link>
		<comments>http://lbdigest.com/2007/12/16/think-youre-connected-think-again/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 23:04:33 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/12/16/think-youre-connected-think-again/</guid>
		<description><![CDATA[One issue that trips up people when diagnosing load balancer problems is they see a connection has been made to a virtual service, so it looks like they&#8217;re getting through...]]></description>
			<content:encoded><![CDATA[<p>One issue that trips up people when diagnosing load balancer problems is they see a connection has been made to a virtual service, so it looks like they&#8217;re getting through to the real server.</p>
<p>That&#8217;s not always the case.  Depending on how your load balancer is configured, it could simply mean you&#8217;ve made a connection to the load balancer&#8217;s proxy server.</p>
<p>Modern load balancers have actually two different types of virtual services:  Layer 4, and Layer 7.  Clients can&#8217;t really tell the difference, but under the hood, they&#8217;re substantially different in the way they operate.</p>
<p>A Layer 4 virtual service on a load balancer operates much like a router.  It&#8217;s just re-writing source and/or destination addresses.  Not much more than you&#8217;re basic broadband wireless router.</p>
<p><a href="http://lbdigest.com/wp-content/uploads/2007/12/l4.png" title="Layer 4"></a></p>
<p style="text-align: center"><a href="http://lbdigest.com/wp-content/uploads/2007/12/l4.png" title="Layer 4"><img src="http://lbdigest.com/wp-content/uploads/2007/12/l4.png" alt="Layer 4" /></a></p>
<p>Layer 7 code is a type of application proxy, aware of HTTP and a few other protocols depending upon the vendor (such as FTP, SIPS).    The Layer 7 code is what handles cookie persistence. When a connection is made to a Layer 7 virtual service and a request is sent, a separate TCP connection is opened to the server, and the request is forwarded.  Because of the way Layer 7 operations occur, the load balancer *can&#8217;t* send the request to a server until it sees the request, because the request (and items in the header) will tell the load balancer where it&#8217;s sending the request.</p>
<p><a href="http://lbdigest.com/wp-content/uploads/2007/12/l71.png" title="Layer 7 TCP"></a></p>
<p style="text-align: center"><a href="http://lbdigest.com/wp-content/uploads/2007/12/l71.png" title="Layer 7 TCP"><img src="http://lbdigest.com/wp-content/uploads/2007/12/l71.png" alt="Layer 7 TCP" /></a></p>
<p><a href="http://lbdigest.com/wp-content/uploads/2007/12/l7.png" title="Layer 7 TCP"> </a></p>
<p>The tricky part comes when there&#8217;s problem with connectivity between the load balancer and the servers.  If the servers are unresponsive, you will still get a connection to the virtual service.  This can trick you into thinking there&#8217;s something wrong with the servers, when the issue may be elsewhere.</p>
<p>Once this connection is made, what happens next is fairly vendor specific.  Once you&#8217;re connected and make a request, the connection can remain open and stall.  On other vendors, the connection will terminate the second you make a request, with no HTTP error code.</p>
<p>Even within the same vendor, different versions will react differently.  In BIG-IP V4, you can open a connection and make a request, and you&#8217;ll see no response.Â   Eventually the connection will terminate, but you will probably wait a while.Â  In BIG-IP V9 however, when you open a connection and send a request, you&#8217;re immediately sent a TCP reset packet.</p>
<p>If you&#8217;ve setup SSL termination, which would fall into the Layer 7 camp, you&#8217;ll get non-HTTP encoded error (such as read:errno=104, which won&#8217;t show up in the browser, but will show up in a raw TCP connection) when connecting and sending a request to a virtual service with no active real servers.</p>
<p>So it&#8217;s important to know how your virtual service is configured when you&#8217;re troubleshooting an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/12/16/think-youre-connected-think-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BIG-IP V4 Test Script</title>
		<link>http://lbdigest.com/2007/12/12/big-ip-v4-test-script/</link>
		<comments>http://lbdigest.com/2007/12/12/big-ip-v4-test-script/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 19:25:10 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/12/12/big-ip-v4-test-script/</guid>
		<description><![CDATA[When I&#8217;m diagnosing load balancing issues, there are three really critical tools I use: TCPDump HTTP Header dump (such as Live HTTP Headers) Telnet Yup, telnet. I don&#8217;t know about...]]></description>
			<content:encoded><![CDATA[<p>When I&#8217;m diagnosing load balancing issues, there are three really critical tools I use:</p>
<ul>
<li>TCPDump</li>
<li>HTTP Header dump (such as <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">Live HTTP Headers</a>)</li>
<li>Telnet</li>
</ul>
<p>Yup, telnet.  I don&#8217;t know about anyone else, but I use telnet excessively.  Basically, I use it to test TCP connectivity, and with a quick &#8220;GET /&#8221;, to test to see if the web server is responding.</p>
<p>Most modern telnet implementations, including the one on F5&#8242;s BIG-IP version 9, include the ability to choose your source IP address (-b [IP address]).  BIG-IP version 4, however, doesn&#8217;t seem to have this ability.</p>
<p>This was frustrating when trying to test some firewall and routing issues with the BIG-IP&#8217;s SNAT address.   One issue that can come up is when you setup health checking, everything works out, because the IPs are generally that of the BIG-IP&#8217;s self IPs.  But because the SNAT is a different IP, routing or firewall issues may crop up and block the connection.<br />
So I wrote a little Perl script that allows me to test connections with various source IP addresses.   It makes a simple TCP connection and reports whether it&#8217;s successful or not, while allowing me to specify the source IP address.  It&#8217;s very utilitarian, without any <a href="http://apple.com">Jobsian</a> niceties, so I may punch it up some more.</p>
<pre>#!/usr/bin/perl

use IO::Socket;

$num = $#ARGV + 1;

if ($num != 3)
{
    die "Usage: ptelnet [source IP] [destination IP] [destination port]<destination><destination>";
}
$localIP = $ARGV[0];
$destIP = $ARGV[1];
$destport = $ARGV[2];

$remote = IO::Socket::INET-&gt;new(
    Proto =&gt; "tcp",
    LocalAddr =&gt; "$localIP",
    PeerAddr =&gt; "$destIP",
    PeerPort =&gt; "$destport",
    Reuse =&gt; 1
    )
    or die "Can't connect to port $destport at $destIP from $localIP";
print "Connection successful to ", $remote-&gt;peerhost, " on port:
", $remote-&gt;peerport, " from ", $remote-&gt;sockhost, "n";
close($remote);</destination></destination></pre>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/12/12/big-ip-v4-test-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What Application Developers Need To Know About Load Balancers</title>
		<link>http://lbdigest.com/2007/11/28/what-application-developers-need-to-know-about-load-balancers-2/</link>
		<comments>http://lbdigest.com/2007/11/28/what-application-developers-need-to-know-about-load-balancers-2/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 21:05:39 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Buyer's Guide]]></category>
		<category><![CDATA[Feature Articles]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/11/28/what-application-developers-need-to-know-about-load-balancers-2/</guid>
		<description><![CDATA[Youâ€™re an application developer. You work in a world of untyped variables, debugging, and hitting reload over, and over, and over, and over again, all in the name of churning...]]></description>
			<content:encoded><![CDATA[<p>Youâ€™re an application developer. You work in a world of untyped variables, debugging, and hitting reload over, and over, and over, and over again, all in the name of churning out a good web app. You can spot a SQL syntax error from the corner of your eye, and youâ€™re the go-to guy (or gal) for your company.</p>
<p>But what you donâ€™t know much about is load balancers. So hereâ€™s a bit of a primer on load balancing for those involved with application development.</p>
<p><em><strong>Persistence</strong></em></p>
<p>The first thing you need to know about is persistence, and specifically, do you require it. If your application is stateful, where information regarding a session is stored on only one server, youâ€™ll need persistence. Virtually all load balancers support this, but youâ€™ll need to know to turn it on (or ask your load balancer administrator to turn it on).</p>
<p>Most applications are stateful, so itâ€™s a fair bet you will. A quick way to test is to start a session on one server, then change the hostname or IP address in your browser to point to another server with the same application installed. Does it break, act freaky, or otherwise malfunction? Then youâ€™ll need persistence.</p>
<p>As Iâ€™ve said several times before, youâ€™ll probably want cookie persistence.</p>
<p><em><strong>What The Load Balancer Passes On To The Server</strong></em></p>
<p>Sometimes Iâ€™m asked what the load balancer changes in the client request to the server.</p>
<p>The answer is: <em>absolutely nothing</em>.</p>
<p>Load balancers will pass all HTTP headers that it receives onto the server. It may add a few items, such as a persistence cookie, but in most configurations, the load balancer wonâ€™t change anything (and with many vendors, the load balancer just doesnâ€™t have the ability to change anything).</p>
<p>A load balancer might give out an HTTP 302 redirect.  A very common example is redirecting from HTTP to HTTPS.</p>
<p><em><strong>Virtual Hosting: The Host Header<br />
</strong></em></p>
<p>This is often called software virtual hosting, virtual hosting, etc. Basically, itâ€™s running more than one URL off the same IP address.</p>
<p>Letâ€™s say youâ€™ve got two URLs: www.domain1.com and www.domain2.com. In DNS, they both point to the same IP address, yet when you go to the sites with a browser, two separate web pages come up. How come? Itâ€™s all in the HTTP host header.</p>
<p>When the browser makes a request, it includes a â€œHost:â€ entry, telling the web server what host itâ€™s looking for. The web server looks at this host, and serves up the appropriate page.</p>
<p>The load balancer will forward this host request along with the entire request. Most load balancers donâ€™t have the ability to even change this.</p>
<p><em><strong>SSL Termination</strong></em></p>
<p>If you utilize SSL on your web site, you may want to consider having the load balancer terminate the SSL connection.</p>
<p>Youâ€™ll want to check to see if the load balancer has hardware acceleration, which is a special card that removes the SSL encryption/decryption operations from the general CPU and onto a specialized processor.</p>
<p>The two main benefits to SSL termination are the performance benefit by having the load balancer handle the SSL instead of your servers, and by terminating the SSL connection on the load balancer, you can use cookie persistence.</p>
<p><em><strong>Header Dump</strong></em></p>
<p>It helps to have a method, in either a standalone page or in your own library as a quick function call, to dump all the HTTP header variables.</p>
<p>In PHP, you can use the built-in phpinfo() function.</p>
<pre>&lt;?php
phpinfo();
?&gt;</pre>
<p>Have this page/function handy, in case a problem arises.Â  Point your load balancer administrator there, and they may be able to point out the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/11/28/what-application-developers-need-to-know-about-load-balancers-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP and Load Balancers</title>
		<link>http://lbdigest.com/2007/11/27/php-and-load-balancers/</link>
		<comments>http://lbdigest.com/2007/11/27/php-and-load-balancers/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 20:11:47 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/11/27/php-and-load-balancers/</guid>
		<description><![CDATA[I got this email today from Don Keller in New Orleans regarding PHP interacting with a load balancer: I read somewhere that the load balancer you run must support sessions,...]]></description>
			<content:encoded><![CDATA[<p>I got this email today  from Don Keller in New Orleans regarding PHP interacting with a load balancer:</p>
<blockquote><p> I read somewhere that the load  balancer you run must support sessions, otherwise you must  use cookies.&#8221;</p></blockquote>
<p>This is a common type of question that people who are on the application development side of the fence have regarding load balancers.</p>
<p>With regard to PHP sessions, this typically means that the application is &#8220;stateful&#8221;, that is, there is information regarding a particular session (such as shopping cart contents, login credentials, etc.) that are stored only on an individual server, and not shared amongst a group of servers.</p>
<p>Most modern applications these days are stateful, whether it&#8217;s on PHP, or Websphere, or just about any other platform.</p>
<p>For stateful applications to work with load balancers, the load balancers need to do persistence, which keeps a specific user tied to a single server, even though there may be several or even dozens of other servers available.  And the best persistence for web serving is <a href="http://lbdigest.com/2007/09/06/the-argument-for-cookies/">cookie persistence</a>.</p>
<p>It&#8217;s very simple to setup, and usually involves a simple check box in the load balancer&#8217;s configuration.  Cookie persistence (specifically, active-cookie) inserts a cookie into an HTTP header which it then uses to identify which server subsequent requests should go to.  It requires not additional configuration on the application, and the inserted cookie will not interfere with any existing cookie.</p>
<p>So the answer is simple:  With a PHP application that uses sessions, you&#8217;ll need to configure persistence, you&#8217;d be wise to select a load balancer that supports cookie persistence.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/11/27/php-and-load-balancers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Choose A Load Balancer</title>
		<link>http://lbdigest.com/2007/11/16/how-to-choose-a-load-balancer/</link>
		<comments>http://lbdigest.com/2007/11/16/how-to-choose-a-load-balancer/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 16:03:46 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Ask Tony]]></category>
		<category><![CDATA[Buyer's Guide]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/11/16/how-to-choose-a-load-balancer/</guid>
		<description><![CDATA[I get a lot of questions on what&#8217;s the best load balancer to choose. There are currently over 20 vendors too choose from, so buyers can experience a little bit...]]></description>
			<content:encoded><![CDATA[<p>I get a lot of questions on what&#8217;s the best load balancer to choose.   There are currently over 20 vendors too choose from, so buyers can experience a little bit of over-choice shutdown.</p>
<p>So, here&#8217;s a few tips to help whittle down the vendors.</p>
<p>The first thing to consider is what type of company you are.  Are you a huge mega-corporation?  A financial?  A scrappy upstart? That by itself will dramatically reduce the number of viable vendors.  If you&#8217;re a Fortune 500, you&#8217;re going to want to go with one of the established premium market players.  If you&#8217;re a scrappy upstart, your budget is probably very limited, so you&#8217;ll want a value vendor.</p>
<p>Next, consider the focus of the companies you&#8217;re evaluating.  Is their primary focus load balancing?  Is their core competency networking in general, with a tiny subset dealing with load balancing?  There are companies that are intently focused on load balancing, and companies that are generalists with networking products.  F5 and Cisco are great examples of each.  F5 is intently focused on load balancing, and generally have the best in terms of features and technology.  Cisco hasn&#8217;t been as focused, and seem to always be playing catch-up in terms of features, but they do have a widely known, highly regarded reputation.  Just about everyone has heard of Cisco, few outside of IT have heard of F5.  I tend to prefer the better technology, but both aspects have merit, and which has precedence depends highly upon your corporate directives and culture.</p>
<p>Of course, there&#8217;s also the new versus used question, but I think you know my answer on that one: Always buy new.  Not because of the coveted &#8220;new load balancer smell&#8221; (although it is delightful), but because new boxes are supported by the vendor in terms of software updates and hardware failures, and used typically aren&#8217;t.</p>
<p>The rest of the selection process depends highly upon whether you&#8217;re going for the value market or you&#8217;re going for the premium market.  I will be updating shortly with the process I recommend.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/11/16/how-to-choose-a-load-balancer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

