<?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; Load Balancing 101</title>
	<atom:link href="http://lbdigest.com/category/load-balancing-101/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>iRules: Cold Dead Hands</title>
		<link>http://lbdigest.com/2011/03/28/irules-cold-dead-hands/</link>
		<comments>http://lbdigest.com/2011/03/28/irules-cold-dead-hands/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 20:41:13 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=523</guid>
		<description><![CDATA[One of the biggest differentiators in load balancing is whether or not the product has the ability to manipulate traffic using application logic, not just direct traffic. The best known...]]></description>
			<content:encoded><![CDATA[<p>One of the biggest differentiators in load balancing is whether or not the product has the ability to manipulate traffic using application logic, not just direct traffic.</p>
<p>The best known product for traffic manipulation is likely F5&#8242;s legendary iRules, but other vendors have similar capability such as A10&#8242;s aFlex.   Essentially, this puts an application development platform. Typically this is done with a standard programming language, such as a modified <a href="http://en.wikipedia.org/wiki/Tcl">TCL</a> for iRules and aFlex.</p>
<p>Some vendors, (Cisco I&#8217;m looking at you, as well as Brocade but I&#8217;m less familiar with them lately) lack the ability to manipulate traffic using application logic.</p>
<p>For vendors, this is a great feature to have. Its attractive to potential customers, and it makes it difficult to move to a platform that doesn&#8217;t have this feature. I call it the Charlton Heston feature, since you&#8217;ll only pull it out of a client&#8217;s cold dead hands.  Once you use it, you&#8217;re fairly dependent on it.</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2011/03/colddeadhands.jpg"><img class="aligncenter size-full wp-image-525" title="colddeadhands" src="http://lbdigest.com/wp-content/uploads/2011/03/colddeadhands.jpg" alt="" width="447" height="280" /></a><em>Get your paws off me, you damned dirty network admins!</em></p>
<p>In general, I&#8217;m a fan of iRules and their ilk. There&#8217;s just too many situations where the ability to manipulate HTTP content has saved the day.</p>
<p>So what kind of manipulation can you do?  There are rules to scrub credit card numbers, so if a web application tries to display a credit card number such as &#8220;5123-1234-1234-1234&#8243; (a big no-no according to <a href="https://www.pcisecuritystandards.org/security_standards/index.php">PCI-DSS</a>), the load balancer would do a regular expression search for that pattern, and replace it with &#8220;XXX-XXX-XXXX-1234&#8243; before sending the response off to the client.</p>
<p>With a programming language and regular expressions, just about anything is possible. And there in lies a problem.</p>
<p><em>Two Edged Sword</em></p>
<p>Having application logic on the load balancer is a double-edged sword.  One the one hand, it allows you to have very granular control over headers and content for requests and responses.  The drawback is <em>it allows you to have very granular control over headers and content for requests and responses.</em></p>
<p>The awesomeness of this manipulation is evident, but there are some caveats.</p>
<p><em>We&#8217;ll fix it in post</em></p>
<p>There&#8217;s a running joke in the film industry called &#8220;we&#8217;ll fix it in post&#8221;.  Essentially, it means who cares if we get it right here, we&#8217;ll just fix it with special effects or editing.  Except it hardly ever works.  You&#8217;ve got the same hazard in something like iRules; it can be a lousy and lazy way to fix to a problem that really should be fixed in the code.</p>
<p><em>Capacity</em></p>
<p>Of course, all this regular expressioning and application logic come at a cost in terms of CPU.  The more of it you do, the lower capacity you&#8217;ll have.  A load balancer capable of serving up 4 Gbits of second of traditional Layer 4-7 traffic may have its capacity dropped to 500 Mbps.  And there&#8217;s no way of telling what the new performance ceiling would be (until you hit it like Wile E Coyote on a rocket sled).</p>
<p><a href="http://lbdigest.com/wp-content/uploads/2011/03/wileecoyote.jpg"><img class="aligncenter size-full wp-image-526" title="wileecoyote" src="http://lbdigest.com/wp-content/uploads/2011/03/wileecoyote.jpg" alt="" width="147" height="200" /></a>This is less of an issue than it used to be, as Moore&#8217;s law has made processors faster and faster, allowing load balancers to handle increasingly difficult tasks, while bandwidth requirements have not increased nearly as dramatically. Not many organizations have more than a couple hundred megabits per second to the Internet, while load balancers are capable of handling several (even dozens) of Gigabits.</p>
<p><em>Latency</em></p>
<p>Latency is a dirty word in networks and applications, and certainly a potential issue with application logic.  If you&#8217;re going to look at a cookie, the latency imposed by a load balancer will be minimal.  If you&#8217;re going to calculate Pi to the 100th digit on every HTTP request, that&#8217;s going to add a certain amount of latency to the transaction.  Like the capacity ceiling, it&#8217;s very difficult to predict what that additional latency will be when adding more and more logic. And depending on the load profile, that latency may vary quite a bit over time.</p>
<p><em>Creep</em></p>
<p>Capacity and latency are easy enough issues to deal with, but creep is very problematic.  It&#8217;s a &#8220;Layer 8&#8243; problem, and one that can quickly spiral out of control.</p>
<p>Typically the creep comes into play when you first implement application logic, and it fixes a vexing problem. You&#8217;re the hero, and someone perks their ears up and says &#8220;wow, what else can you do with it?&#8221;</p>
<p>&#8220;Anything&#8221;, you say confidently.  And anything is what they throw at you. Add semi-colons at the end of paragraphs, replace all double-spaces after a period with single spaces, etc.</p>
<p>It can very easily spiral out of control, so you need to know when to put your foot down (hint: early).</p>
<p><em>Skills</em></p>
<p>To develop this application logic, you need to understand HTTP really well. When developing most web applications on a platform like ASP or PHP, you don&#8217;t really need to understand HTTP all that well.  But the load balancer manipulates on the HTTP level, so you&#8217;ll really need to be up on your HTTP. You also need to have the programming skills to pay the bills. Especially for a network admin, those programming muscles might not get flexed on a regular basis.</p>
<p>I&#8217;ve also heard the argument that iRules and their ilk are only there to fix problems that should have been fixed in the code. And there&#8217;s a lot of truth in that; they are typically used in situations where the problem could also be solved at the application.</p>
<p>But that&#8217;s also like saying that I shouldn&#8217;t need a lock on my door, because people should not be jerks and go around stealing stuff.</p>
<p>In IT, there are always going to be situations where its either easier to fix the problem on the load balancer, or it&#8217;s the only viable solution (code locked down, client doesn&#8217;t control the code as its a third party, developer ran away to Brazil with their secret family and won&#8217;t return calls).</p>
<p>Bottom line? I&#8217;d rather have it than not have it, but I&#8217;m very careful with it. After all, with great power comes great potential for epic fail.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2011/03/28/irules-cold-dead-hands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Achilles Heal for Virtual Load Balancers: SSL</title>
		<link>http://lbdigest.com/2011/03/14/achilles/</link>
		<comments>http://lbdigest.com/2011/03/14/achilles/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 18:03:07 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[In the Wild]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=512</guid>
		<description><![CDATA[I&#8217;m a big fan of virtualization.  There&#8217;s a lot to like about it, including consolidation (getting rid of space-heater servers that do nothing running 1% CPU and sucking up electricity...]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-516" title="maxheadroom" src="http://lbdigest.com/wp-content/uploads/2011/03/maxheadroom.jpg" alt="" width="440" height="331" /></p>
<p>I&#8217;m a big fan of virtualization.  There&#8217;s a lot to like about it, including consolidation (getting rid of space-heater servers that do nothing running 1% CPU and sucking up electricity and throwing off heat), flexibility, and management.  I&#8217;ve even gone and got my VCP4 (VMware Ceritified Professional 4) certification.  (Hear that ladies? I&#8217;m <em>certified.</em>)</p>
<p>One aspect of virtualization I&#8217;m a fan of is the appliances.  Vendors are taking physical appliances (such as a Vyatta router) and turning it into a VM appliance.  I don&#8217;t have to worry about an underlying operating system (and the requisite patches), the appliance vendor handles the software and the OS.</p>
<p>Several load balancing vendors have gotten into that virtualization game.  Vendors that have traditionally offered hardware appliances now have virtual appliances (some for years).  From From F5 to KEMP, from Coyote Point to loadbalancer.org, there are a number of virtual load balancers/ADCs to choose from.   And for the most part, they offer the same features as their hardware brethren.</p>
<p>Their throughput and performance is hampered somewhat by the fact that they&#8217;re all software and no silicon. Everything is done in the x86 virtualized CPU(s).  Still, depending on how you provision them, they can generally handle several thousand HTTP requests per second even in Layer 7 mode.</p>
<p>The one caveat to virtual load balancers is that their SSL performance is severely limited.  Even value-market load balancers that do most of their functions in a general purpose CPU will still use SSL ASICs for the asymmetric crypto (even using the general processor for the less CPU-intensive symmetric crypto).</p>
<p style="text-align: left;">The first part of every new SSL connection is a very CPU-intensive asymmetric operation (about 1000x more CPU intensive than symmetric operations).    CPUs that can normally handle tens of thousand of regular TCP connections per second can only handle a few thousand SSL connections at the most.</p>
<p>It is technically possible to do hardware SSL acceleration on a VM load balancers however.  It requires that the virtual machine host (like VMWare ESXi) have an SSL card installed, and VM Passthrough enabled (where the virtual machine can have direct access to physical hardware).</p>
<p>Unfortunately, these SSL cards are tough to come by.  Cavium is probably the most notable vendor, but cards from them aren&#8217;t exactly easy to come by, and they&#8217;re fairly expensive.  You may not have the option if you&#8217;re using blade systems.   And if you you want to leverage features like HA and DRS (using ESX hosts in a cluster), then every machine in the cluster would need to have such a card.  I&#8217;m not aware of any virtual load balancer vendor that even supports this configuration.</p>
<p>There are a lot of situations where virtual load balancers make a lot of sense, but keep in mind that the SSL performance capability is going to be fairly constrained.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2011/03/14/achilles/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CPS versus TPS: How to Measure SSL Performance</title>
		<link>http://lbdigest.com/2011/03/11/cps-versus-tps-how-to-measure-ssl-performance/</link>
		<comments>http://lbdigest.com/2011/03/11/cps-versus-tps-how-to-measure-ssl-performance/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 07:44:34 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Buyer's Guide]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=506</guid>
		<description><![CDATA[SSL performance is a tricky thing to measure.  There are a lot of different aspects to consider, and on top of that different vendors use slightly different definitions for the...]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" src="http://icanhascheezburger.files.wordpress.com/2010/01/funny-pictures-cat-will-do-science.jpg" alt="" width="500" height="674" /></p>
<p>SSL performance is a tricky thing to measure.  There are a lot of different aspects to consider, and on top of that different vendors use slightly different definitions for the same terms. I was talking with a vendor the other day, and I realized as we were talking performance numbers we had different definitions for the term TPS (Transactions Per Second) and CPS (Connections Per Second).</p>
<p>TPS is probably one of the more ill-advised acronyms (<a href="http://it.toolbox.com/blogs/oracle-guide/i-smell-a-rat-an-oracle-rat-acronyms-may-or-may-not-be-your-friend-20767?reftrk=no" target="_blank">boy do we love acronyms</a>) for load balancers, because it&#8217;s open to debate what the &#8220;transaction&#8221; in transactions per second means.</p>
<h3><strong>SSL Basics</strong></h3>
<p>Before we talk about CPS versus TPS, let&#8217;s review some SSL basics.  In a new SSL connection, two things happen: An asymmetric exchange, then a transition to symmetric encryption.</p>
<p>The asymmetric part is why load balancers from <a href="http://www.f5.com" target="_blank">F5</a> to <a href="http://kemptechnologies.com" target="_blank">KEMP</a> use SSL accelerator chips.  It&#8217;s incredibly CPU intensive; so much so that a server that is capable of tens of thousands of connections per second of regular TCP connections is only capable of several hundred SSL connections.  To keep this from crippling the CPU, SSL accelerator processors are used to offload the cryptographic functions from the main CPU.</p>
<p>So when we measure SSL performance of a load balancer, we typically want to measure three things:</p>
<p>1: How many new SSL connections per second can a device handle, that is how many of the expensive RSA operations per second are possible.</p>
<p>2: How much bandwidth of SSL traffic can the device push.  This is symmetric encryption (such as AES), and is much easier on a CPU.</p>
<p>3: How many HTTP requests per second can the device handle after an SSL connection is established.  In HTTP 1.1, a client is allowed to make multiple HTTP requests off a single TCP/SSL connection.  This is far more efficient than the old HTTP 1.0 standard, that required a separate TCP connection for each object.  Many sites will have pages with literally hundreds of objects (I&#8217;m looking at you http://vg.no).</p>
<p>The trick is how many HTTP requests per SSL connection?  Personally, I&#8217;d say anywhere between 10 to 20 is a pretty good place to start, but that&#8217;s not what everyone uses.  In an epically flawed fight that <a href="http://www.o3magazine.com/4/a/0/2.html">o3 magazine picked with F5</a>, author John Buswell claimed that an Nginx-based box he built could handle 25,000 TPS.</p>
<blockquote><p><em>The system had no problems handling over 26,590 TPS, the test lab ran out of capacity to generate additional transactions. Compare that to the F5 Networks Big-IP 6900 which handles a maximum of 25,000 TPS but carries a starting price tag of $55,000. </em></p></blockquote>
<p>The box he used had 2 quad core Opteron CPUs that <em>were in no way capable</em> of doing 26,000+ new SSL connections per second without an SSL accelerator card (which he didn&#8217;t use).  A few thousand 1024-bit RSA operations per second at the most, but definitely not 26,000.</p>
<p>He likely made the mistake of opening a couple of SSL connection, and running 25,000+ HTTP request per second off those open TCP/SSL connections (which is not even close to a real world scenario).   25,000 HTTP requests per second is within the capabilities of his box.  This is not how F5 measures TPS, nor how any other vendor measures TPS.  Of course, I&#8217;m only guessing at his methodology, as he never bothered to share his testing methodology.  (F5 and other vendors share their methodology).</p>
<p>TPS versus CPS</p>
<p>While SSL throughput is pretty easy to measure and the definition is identical for all vendors, the terms TPS and CPS aren&#8217;t.  So what do they mean?  CPS (Connections per Second) can mean a couple of things.  For SSL, it would typically mean <em>new</em> SSL connections, requiring the asymmetric operation.  Some vendors use TPS for this definition (the T standing for an asymmetric transaction), while other vendors use CPS for the SSL portion, and TPS for the HTTP-within-an-SSL connection.</p>
<p>So it&#8217;s important to understand what&#8217;s being measured.  Different vendors have different ideas of what that means, although they are honest differences of opinions (things reasonable people can disagree on).  Most vendors are reputable and will outline the methodology they used to come up with their numbers (03 magazine did not).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2011/03/11/cps-versus-tps-how-to-measure-ssl-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The HTTP Cookie Monster</title>
		<link>http://lbdigest.com/2010/11/01/the-http-cookie-monster/</link>
		<comments>http://lbdigest.com/2010/11/01/the-http-cookie-monster/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 18:49:14 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Industry News]]></category>
		<category><![CDATA[Load Balancing 101]]></category>
		<category><![CDATA[Notes from the publisher]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=491</guid>
		<description><![CDATA[кухненско обзавеждане The fact is, we&#8217;re more addicted to cookies than even Cookie Monster Came upon this post on Slashdot.org, a criticism of HTTP cookies entitled &#8220;HTTP cookies, or how...]]></description>
			<content:encoded><![CDATA[<p><span style="position: absolute; overflow: hidden; height: 0; width: 0;"><a href="http://www.videnov.com/">кухненско обзавеждане</a></span><a href="http://lbdigest.com/wp-content/uploads/2010/11/cookie-monster-abusing-cookie-dough.png"><img class="aligncenter size-full wp-image-500" title="cookie-monster-abusing-cookie-dough" src="http://lbdigest.com/wp-content/uploads/2010/11/cookie-monster-abusing-cookie-dough.png" alt="" width="546" height="384" /></a></p>
<p style="text-align: center;"><em>The fact is, we&#8217;re more addicted to cookies than even Cookie Monster</em></p>
<p>Came upon this post on Slashdot.org, a criticism of HTTP cookies entitled &#8220;<a href="http://lcamtuf.blogspot.com/2010/10/http-cookies-or-how-not-to-design.html">HTTP cookies, or how not to design a protocol</a>&#8220;.    It goes into many of the security issues surrounding HTTP cookies, and how the popular criticisms (privacy) aren&#8217;t the real problems.</p>
<p>The problem is, HTTP cookies are absolutely vital to everything we do on the Internet. Any website that we visit where the server builds up customized content (even if it&#8217;s just selection which region we&#8217;re from, like on Fedex.com), depends up on cookies.</p>
<p>Want to play a nasty prank on a co-worker who doesn&#8217;t lock their screen when they leave their desk?  Disable cookies on their browser.  Nothing works.</p>
<p>Cookies are just about the only mechanism in use to create a unique relationship between a client and a server. In other words, a cookie is the only way to establish a session.  Other than cookies (or long URLs), the HTTP protocol does not</p>
<p>In the end, we&#8217;re worse than cookie monster with our cookie addiction.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2010/11/01/the-http-cookie-monster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Message: The PDU of Layer 7</title>
		<link>http://lbdigest.com/2009/08/02/http-message-pdu-layer/</link>
		<comments>http://lbdigest.com/2009/08/02/http-message-pdu-layer/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 23:51:23 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=394</guid>
		<description><![CDATA[If there&#8217;s one thing that made load balancing and web servers in general &#8220;click&#8221; with me, and make it much simpler to troubleshoot, it&#8217;s this:Â  See the world like a...]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s one thing that made load balancing and web servers in general &#8220;click&#8221; with me, and make it much simpler to troubleshoot, it&#8217;s this:Â  See the world like a load balancer.Â  We see web pages, page layouts, &#8220;page cannot be displayed&#8221; errors, and menus.Â  But your load balancer/web server doesn&#8217;t see any of this.Â  In fact, they only see <em>one</em> thing.Â  HTTP messages.</p>
<p>In the networking realm, there is the concept of PDUs, or Protocol Data Units.Â  These are the discreet messages for a particular protocol. Â  Every protocol has them.Â  In Layer 2, the Ethernet protocol has the Ethernet Frame, and for Layer 3 the IP protocol has the IP packet, just to name a few examples.Â Â  Each of theses PDUs have their own format.</p>
<p>For the HTTP protocol, which operates on Layer 7, we also have a PDU: <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html">The HTTP message</a>.Â  HTTP messages are further divided into two categories: HTTP requests and responses.</p>
<p>When your browser wants an object, such as an JPG or HTML file, it must make a properly formatted HTTP request.Â  The server responds with an HTTP object.Â  One object equals one request plus one response.Â  Typically the response includes the object, although sometimes the response says simply &#8220;file not found&#8221; (HTTP 404), &#8220;object moved&#8221; (HTTP 301 or 302), or even &#8220;access denied&#8221; (HTTP 400), among others.</p>
<p>But the thing to keep in mind is that every object, which is to say every JPG, HTML, Flash, CSS, MPEG, every individual file, will require its own HTTP request and will generate an HTTP response from the server.Â  A web page consisting of 10 objects will require 11 HTTP requests:Â  One for the HTML page itself, and 10 additional requests to pull all of the objects referenced in the HTML.</p>
<p>In the next post, we&#8217;ll discuss some tools you can use to troubleshoot HTTP requests and responses.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2009/08/02/http-message-pdu-layer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moore&#8217;s Law and Bandwidth Consumption</title>
		<link>http://lbdigest.com/2009/05/27/moores-law-and-bandwidth-consumption/</link>
		<comments>http://lbdigest.com/2009/05/27/moores-law-and-bandwidth-consumption/#comments</comments>
		<pubDate>Wed, 27 May 2009 07:26:22 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Buyer's Guide]]></category>
		<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=379</guid>
		<description><![CDATA[Most in IT are familiar with the concept of Moore&#8217;s Law, whereby processor capability tends to double about every two years.Â  To a certain extent, this happens with networking equipment,...]]></description>
			<content:encoded><![CDATA[<p>Most in IT are familiar with the concept of Moore&#8217;s Law, whereby processor capability tends to double about every two years.Â  To a certain extent, this happens with networking equipment, with their capacity increasing at a steady rate, although probably not the same rate at processors.</p>
<p>Benefiting from Moore&#8217;s Law to a great extent are load balancers/ADCs, where the lowest end device from just about every vendor can handle traffic loads in the 50-100 Mbps range.Â  Of course, throughput isn&#8217;t a terrible way of measuring performance capability of a load balancer (100 Mbps of large file downloads is a heckuva lot easier than 100 Mbps of tiny file connections), but it does relate well to one very important factor in web site serving:</p>
<p>How big is your pipe?</p>
<p>Businesses of all sizes have seen steady increases in their available bandwidth to be sure, but while the growth may be steady, for the most part it tends to be a slower growth rate.Â  Much slower than doubling every 18 months, like in Moore&#8217;s Law.Â Â  The result is that increasingly that the lower end offerings from vendors are more than sufficient to run a larger share of web sites out there.</p>
<p>There are a number of reasons for this.Â  We&#8217;re no longer experiencing the exponential accross-the-board growth rates in users that occurred during the dot-com boom.Â  While there are some sites going through a growth explosion, for most websites in this economic environment, growth rates of any kind are fairly extraordinary.Â  So extra bandwidth isn&#8217;t in as high demand. Secondly, if you&#8217;re hosting your own data center as many large businesses do, getting extra bandwidth is often time consuming.Â  Moving from a single DS3 (45 Mbps) to an OC-3 (155 Mbps) is going to take some time to get that order fulfilled.</p>
<p>Cisco&#8217;s ACE 4710 appliance comes with a default license of 1 Gbps of throughput.Â  F5&#8242;s entry-level BIG-IP 1600 LTM maxes out at 1 Gbps.Â Â  In the Enterprise market, 500-Mbps to 1 Gbps is about the rock bottom in terms of performance capability.Â  Yet many of the high-end clients of these vendors don&#8217;t push nearly that much traffic.</p>
<p>Companies that aren&#8217;t media or mega-content providers (such as Google, Youtube, Yahoo!, Facebook, etc.) that have web applications serving customers or businesses typically don&#8217;t go above 100-200 Mbps in traffic, even for some Fortune 500 companies.Â   Of course, there are exceptions, and there are quite a few factors involved in determining the traffic characteristics of a site. Companies that are offering media such as streaming video or audio often use third-party content providers, such as Youtube or Akami, so as to keep that bandwidth off their own pipe.</p>
<p>So we&#8217;ve got all this idle CPU time, so why not make use of it?Â  That&#8217;s what many vendors are doing, in both the enterprise and value markets. With the steady rise in CPU power while bandwidth consumption lags behind, vendors are throwing more and more capabilities into these devices to take advantage of the unused CPU cycles, such as caching, compression, Layer-7 inspection, etc.Â  Vendors are offering more functionality with the greater power they have available to them.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2009/05/27/moores-law-and-bandwidth-consumption/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Load Balancing Performance Metrics 101</title>
		<link>http://lbdigest.com/2009/05/20/load-balancing-performance-metrics-101/</link>
		<comments>http://lbdigest.com/2009/05/20/load-balancing-performance-metrics-101/#comments</comments>
		<pubDate>Thu, 21 May 2009 03:31:49 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=372</guid>
		<description><![CDATA[In the previous post, I talked about the o3 article, and where I think they may have gotten it wrong (but it&#8217;s impossible to tell, as he didn&#8217;t publish any...]]></description>
			<content:encoded><![CDATA[<p>In the previous post, I talked about the o3 article, and where I think they may have gotten it wrong (but it&#8217;s impossible to tell, as he didn&#8217;t publish any details on his testing methodologies, which is pretty lame).</p>
<p>But that he may have used the wrong terminology for the performance testing he did (saying it was TPS instead of HTTP requests per second) shows that there&#8217;s a lot of confusion on benchmark terminology, so I&#8217;m going to go over some of the basics.</p>
<h1>TPS</h1>
<p>In the load balancing world, TPS (Transactions per second) refer to the number of <em>new</em> SSL connections initiated.Â  The new part is important, because each new SSL connection requires a relatively CPU-expensive asymmetric encryption operation.Â  This is why most load balancers that do SSL have a separate chip for SSL processing (SSL ASIC), which offloads the SSL functionality from the main CPU.</p>
<p>Once the first step of an SSL connection is completed, the encryption then shifts to the much more CPU-friendly symmetric encryption, which is often referred to as &#8220;bulk encryption&#8221;.Â  Pushing bulk encryption throughput is relatively easy for a load balancer, even without an SSL accelerator chip.</p>
<p>However, HTTP/HTTPS typically involve short-lived connections, so there is relatively little throughput, and a lot of connection setup/teardown. Hence the need to know the TPS rating of a given device.</p>
<p>Many vendors will offer tiered licensing for SSL TPS.Â  So keep in mind when they mean TPS, they usually reffer to *new* SSL connections per second.</p>
<h1>Connection Rate versus Request Rate</h1>
<p>There are two ways to measure &#8220;rates&#8221; with load balancers:Â  Connection rate, and request rate.Â  While they sound similar, when you get right down to it, they&#8217;re actually quite different.</p>
<p>Connection rate refers to the number of TCP connections per second a device can handle.Â  HTTP request rate refers to the number of HTTP requests the device can handle.Â  How are they different? You can have multiple HTTP requests in a single TCP connection.</p>
<p>When your browser goes to a web site, it firsts initiates a TCP connection to the server (or in our case, a load balancer load balancing traffic for servers).Â  In that TCP connection, your browser will typically make several HTTP requests over that connection.</p>
<p>Making multiple requests over a single TCP connection is a lot easier than making a TCP connection for every single request.Â  In fact, the original HTTP 1.0 specification required on TCP connection per request.Â  The HTTP 1.1 specification fixed that, by allowing the multiple requests per TCP stream.</p>
<h1>Layer-4 versus Layer-7</h1>
<p>When a load balancer operates in Layer-4 mode, it&#8217;s functioning a lot like a router.Â  In fact, it&#8217;s not doing much more than your wireless access point at home.Â  Very little memory is consumed with each new connection, and only the TCP/IP header information is evaluated.</p>
<p>When a load balancer operates in Layer-7 mode, it&#8217;s functioning more like a server.Â  The TCP session is terminated at the load balancer, and a new TCP connection is initated to the server.Â  HTTP requests are buffered in the load balancer&#8217;s memory in order to be evaluated.Â  This requires a lot more processing power and a lot more memory.</p>
<p>Obviously, a load balancer can handle more Layer-4 workload than Layer-7, so it&#8217;s important to know which mode you plan on using when it comes to performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2009/05/20/load-balancing-performance-metrics-101/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best of Both Worlds: Selective Source-NAT</title>
		<link>http://lbdigest.com/2009/03/11/best-of-both-worlds-selective-source-nat/</link>
		<comments>http://lbdigest.com/2009/03/11/best-of-both-worlds-selective-source-nat/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 04:23:32 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Load Balancing 101]]></category>
		<category><![CDATA[Tech Notes]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=289</guid>
		<description><![CDATA[One of the most common issues that comes up is something often referred to as the &#8220;same subnet&#8221; problem.Â  In certain configurations, you cannot connect to a VIP (Virtual IP...]]></description>
			<content:encoded><![CDATA[<p>One of the most common issues that comes up is something often referred to as the &#8220;same subnet&#8221; problem.Â  In certain configurations, you cannot connect to a VIP (Virtual IP address, or Virtual Server) if the client you&#8217;re connecting from is on the same subnet as the real server.</p>
<p>For many situations, connecting from the same subnet as your real servers is not a big deal.Â  However, there are some situations where this is required.Â  One of the most common reasons I see is that one of the web application servers needs to connect to a VIP that distributes load between other servers on that same subnet.</p>
<p>Most server load balancing happens through NAT (Network Address Translation), with the only exception being <a href="http://lbwiki.com/index.php/DSR">DSR (Direct Server Return)</a>.Â  You have the option of two different types of NAT: Half-NAT and Source-NAT (SNAT).Â  In half-NAT, only the destination address is changed on the way in.Â  In SNAT, both the source and destination are changed.</p>
<p>If you&#8217;re using half-NAT, you cannot connect to a VIP from the same subnet a server resides on.Â  The reason for this has something to do with the 4-steps required to do server load balancing NAT.</p>
<p style="text-align: center;"><img class="size-medium wp-image-295 aligncenter" title="network1" src="http://lbdigest.com/wp-content/uploads/2009/03/network1-254x300.png" alt="network1" width="254" height="300" /><em>Figure 1: Network Scenario</em></p>
<p>Take a look at the network scenario depicted in Figure 1.Â  In this diagram, you see a client with the IP of 10.1.1.1, a VIP on a load balancer with an IP address of 192.168.1.200, and a server with an IP address of 192.168.1.11 as well as some other devices.</p>
<p>Now, the NAT happens in 4-steps, regardless of whether the load balancer is operating in Layer 4 or Layer 7 mode.Â  Take a look at Table 1 and it&#8217;s companion figure, Figure 2.</p>
<table border="0" align="center">
<tbody>
<tr>
<td colspan="4" align="center" bgcolor="#666666"><span style="color: #ffffff;">Half-NAT 4-Step</span></td>
</tr>
<tr>
<td bgcolor="#aaaaaa">Step</td>
<td bgcolor="#aaaaaa">Connection</td>
<td bgcolor="#aaaaaa">Source IP</td>
<td bgcolor="#aaaaaa">Destination IP</td>
</tr>
<tr>
<td bgcolor="#cccccc">1</td>
<td bgcolor="#cccccc">Client -&gt; LB</td>
<td bgcolor="#cccccc">10.1.1.1</td>
<td bgcolor="#cccccc">192.168.1.200</td>
</tr>
<tr>
<td bgcolor="#cccccc">2</td>
<td bgcolor="#cccccc">LB -&gt; Server</td>
<td bgcolor="#cccccc">10.1.1.1</td>
<td bgcolor="#cccccc">192.168.1.11</td>
</tr>
<tr>
<td bgcolor="#cccccc">3</td>
<td bgcolor="#cccccc">Server -&gt; LB</td>
<td bgcolor="#cccccc">192.168.1.11</td>
<td bgcolor="#cccccc">10.1.1.1</td>
</tr>
<tr>
<td bgcolor="#cccccc">4</td>
<td bgcolor="#cccccc">LB -&gt; Client</td>
<td bgcolor="#cccccc">192.168.1.200</td>
<td bgcolor="#cccccc">10.1.1.1</td>
</tr>
</tbody>
</table>
<p style="text-align: center;"><em>Table 1: Half-NAT</em></p>
<p style="text-align: center;"><em><img class="alignnone size-medium wp-image-296" title="network1-steps" src="http://lbdigest.com/wp-content/uploads/2009/03/network1-steps-254x300.png" alt="network1-steps" width="254" height="300" /></em></p>
<p style="text-align: center;"><em>Figure 2: Half-NAT Path</em></p>
<p style="text-align: left;">Because NAT is done on the way in and on the way out, the load balancer needs to be in the path of traffic on the way and on the way out.Â  With half-NAT, this is done by either being in the Layer 2 path of traffic, or somewhat more commonly, the load balancer is the default gateway.</p>
<p style="text-align: left;">Now look what happens when we try to connect from the client PC on the same network as the servers.</p>
<table border="0" align="center">
<tbody>
<tr>
<td colspan="4" align="center" bgcolor="#666666"><span style="color: #ffffff;">Half-NAT 4-Step (from same subnet)<br />
</span></td>
</tr>
<tr>
<td bgcolor="#aaaaaa">Step</td>
<td bgcolor="#aaaaaa">Connection</td>
<td bgcolor="#aaaaaa">Source IP</td>
<td bgcolor="#aaaaaa">Destination IP</td>
</tr>
<tr>
<td bgcolor="#cccccc">1</td>
<td bgcolor="#cccccc">Client -&gt; LB</td>
<td bgcolor="#cccccc">192.168.1.50</td>
<td bgcolor="#cccccc">192.168.1.200</td>
</tr>
<tr>
<td bgcolor="#cccccc">2</td>
<td bgcolor="#cccccc">LB -&gt; Server</td>
<td bgcolor="#cccccc">192.168.1.50</td>
<td bgcolor="#cccccc">192.168.1.11</td>
</tr>
<tr>
<td bgcolor="#cccccc">3</td>
<td bgcolor="#cccccc">Server -&gt; Client</td>
<td bgcolor="#cccccc"><span style="color: #ff0000;">192.168.1.11</span></td>
<td bgcolor="#cccccc"><span style="color: #ff0000;">192.168.1.50</span></td>
</tr>
</tbody>
</table>
<address style="text-align: center;">Table 2: Half-NAT from Same Subnet<br />
</address>
<p style="text-align: left;">Note that only three-steps occured.Â  This is because the server responds <em>directly</em> to the client.Â  Since everything is on the same Layer 3 network, there&#8217;s no reason to go through a default gateway.Â  The critical 4th step doesn&#8217;t occur, so the source address for the server response to the client is invalid.Â  The client sent a connection to 192.168.1.200, and it got a response back from 192.168.1.11.Â  When that happens, the client&#8217;s IP stack correctly drops all the reponses.</p>
<p style="text-align: left;">One solution is to do SNAT.Â  By NATing the source and destination addresses simultaneously, ensure that traffic goes through the load balancer on the way in and on the way out.Â  Observe what happens when we do Full-NAT in Table 3.Â  You&#8217;ll note we&#8217;ve added a new IP address 192.168.1.5, the SNAT address (this can also be a pool of multiple IP addresses).</p>
<table border="0" align="center">
<tbody>
<tr></tr>
<tr>
<td colspan="4" align="center" bgcolor="#666666"><span style="color: #ffffff;">Half-NAT 4-Step</span></td>
</tr>
<tr>
<td bgcolor="#aaaaaa">Step</td>
<td bgcolor="#aaaaaa">Connection</td>
<td bgcolor="#aaaaaa">Source IP</td>
<td bgcolor="#aaaaaa">Destination IP</td>
</tr>
<tr>
<td bgcolor="#cccccc">1</td>
<td bgcolor="#cccccc">Client -&gt; LB</td>
<td bgcolor="#cccccc">192.168.1.50</td>
<td bgcolor="#cccccc">192.168.1.200</td>
</tr>
<tr>
<td bgcolor="#cccccc">2</td>
<td bgcolor="#cccccc">LB -&gt; Server</td>
<td bgcolor="#cccccc">192.168.1.5</td>
<td bgcolor="#cccccc">192.168.1.11</td>
</tr>
<tr>
<td bgcolor="#cccccc">3</td>
<td bgcolor="#cccccc">Server -&gt; LB</td>
<td bgcolor="#cccccc">192.168.1.11</td>
<td bgcolor="#cccccc">192.168.1.5</td>
</tr>
<tr>
<td bgcolor="#cccccc">4</td>
<td bgcolor="#cccccc">LB -&gt; Client</td>
<td bgcolor="#cccccc">192.168.1.200</td>
<td bgcolor="#cccccc">192.168.1.50</td>
</tr>
</tbody>
</table>
<address style="text-align: center;">Table 3: Full-NAT from Same Subnet</address>
<p style="text-align: left;">SNAT makes it possible to connect to the VIP from the same subnet that the servers are on.Â  But there&#8217;s one little problem:Â  The true source IP address is now hidden from the servers, so the server logs would show all connections as originating from 192.168.1.5.Â  Many web sites count on the true source IP address of the client showing up in the logs in order to munge the logs.</p>
<p style="text-align: left;">So you&#8217;re caught between a rock and a hard place.Â  On one had, you have the true source preserved with half-NAT, but you can&#8217;t connect to the VIP from the same subnet as the servers.Â  On the other hand, you can connect to the VIP from the same subnet, but the true source is hidden.</p>
<p style="text-align: left;">There is a third option if you&#8217;re using HTTP or HTTPS.Â  When you SNAT you can also insert the real source IP address as an HTTP header in the request.Â  The server, if configured, can then record the HTTP header in its log instead of the Layer 3 source address.Â  However, this requires configuring both the load balancer and all the servers.Â  For Apache, it&#8217;s a one line config change.Â  For IIS, it requires an ISAPI filter (such as<a href="http://devcentral.f5.com/weblogs/joe/archive/2005/09/23/1492.aspx"> this one from F5</a>).</p>
<h2 style="text-align: left;">Selective SNAT</h2>
<p style="text-align: left;">Instead of deciding between SNAT and half-NAT, some vendors have the ability to use both on a VIP, choosing which based on the incoming source IP address.Â  A couple of vendors offer this option, but since I happen to have an <a href="http://lbdigest.com/2009/03/09/a10-networks-20-release/">A10 Networks AX2200 from a recent review</a>, so I&#8217;ll use that as an example.</p>
<p style="text-align: left;">The first step is to build an access list that matches the network that you want to be SNAT&#8217;d. This would normally be the subnet that your servers reside on, although there are situations where it would make sense to add in a few more subnets.</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-298" title="acl" src="http://lbdigest.com/wp-content/uploads/2009/03/acl.png" alt="acl" width="448" height="95" /></p>
<p style="text-align: left;">A10 uses the standard Cisco IOS-style ACL (including inverse bitmask: 0.0.0.255)Â  We&#8217;re just using it to match the server&#8217;s network, 192.168.1.0/24.</p>
<p style="text-align: left;">Then, in the configuration for the TCP/UDP port of the Virtual Server, we associate ACL 1 with an SNAT pool.</p>
<p style="text-align: left;"><img class="alignnone size-full wp-image-299" title="snat-acl" src="http://lbdigest.com/wp-content/uploads/2009/03/snat-acl.png" alt="snat-acl" width="465" height="146" /></p>
<p style="text-align: left;">Now, any connection to the VIP originating from the server subnet gets SNAT&#8217;d, while everyone else gets half-NAT&#8217;d.Â  Allowing the same subnet to connect while preserving the source IP address for everyone else.Â  It&#8217;s the best of both worlds.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2009/03/11/best-of-both-worlds-selective-source-nat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick and Dirty Performance Testing With Apache Bench</title>
		<link>http://lbdigest.com/2009/02/05/quick-and-dirty-performance-testing-with-apache-bench/</link>
		<comments>http://lbdigest.com/2009/02/05/quick-and-dirty-performance-testing-with-apache-bench/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 10:40:43 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[From The Mailing list]]></category>
		<category><![CDATA[In the Wild]]></category>
		<category><![CDATA[Load Balancing 101]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Quick Guide]]></category>
		<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=249</guid>
		<description><![CDATA[If you need a quick and dirty way to throw some load onto a load balancer/ADC or web server, Apache comes with a great tool called Apache Bench.Â  Since it&#8217;s...]]></description>
			<content:encoded><![CDATA[<p>If you need a quick and dirty way to throw some load onto a load balancer/ADC or web server, Apache comes with a great tool called <a href="http://httpd.apache.org/docs/2.2/programs/ab.html">Apache Bench</a>.Â  Since it&#8217;s an HTTP client, it will of course work with any server, not just Apache-based servers.</p>
<p>Typically, Apache Bench (ab) is installed with the base Apache install, from at least Apache 1.3 on.Â  This includes when Apache is <a href="http://httpd.apache.org/download.cgi">installed on Windows</a>.</p>
<p>You can check all of the available options on the ab <a href="http://httpd.apache.org/docs/2.2/programs/ab.html">documentation page</a>, but here&#8217;s a (very) quick reference to using it.</p>
<p>Two of the most important options are &#8220;-n&#8221; for the number of total connections, and &#8220;-c&#8221; for how many concurrent connections are done at the same time.</p>
<p>For instance, using the option &#8220;-n 1000&#8243; will do 1,000 requests, one at a time, to a target URL.</p>
<pre>ab -n 1000 http://website.com/</pre>
<p>One at a time is rarely an effective test, so it&#8217;s best to use the &#8220;-c&#8221; option to specify a high number of concurrent connections, such as 100.</p>
<pre>ab -n 1000 -c 100 http://website.com/</pre>
<p>If you use concurrency, ab will split the total number of requests up amongst the concurrent settings.Â  For instance, using the option &#8220;-n 1000&#8243; will do 1,000 connections, but &#8220;-n 2000 -c 100&#8243; will only do 20 requests from 100 different connections (2,000 / 100 = 20).Â  So it&#8217;s best to use a much larger number of total connections if you&#8217;re doing concurrency.</p>
<pre>ab -n 100000 -c 100 http://website.com/</pre>
<p>When ab is finished running, it will spit out a performance report, including such info as the time taken for tests, requests per second, wait time, etc.</p>
<pre>Finished 1000 requests

Server Software:        Apache/2.2.9
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        45 bytes

Concurrency Level:      10
Time taken for tests:   0.427 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      320640 bytes
HTML transferred:       45090 bytes
Requests per second:    2341.45 [#/sec] (mean)
Time per request:       4.271 [ms] (mean)
Time per request:       0.427 [ms] (mean, across all concurrent requests)
Transfer rate:          733.17 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   0.4      2       3
Processing:     0    2   0.5      2       7
Waiting:        0    2   0.5      2       6
Total:          0    4   0.7      4       8

Percentage of the requests served within a certain time (ms)
  50%      4
  66%      4
  75%      5
  80%      5
  90%      5
  95%      5
  98%      5
  99%      5
 100%      8 (longest request)</pre>
<p>The ab utility defaults to one request per TCP connection (KeepAlive turned off).Â  If you want to use KeepAlive, where multiple requests are made through a TCP connection, use the &#8220;-K&#8221; option, open up as many TCP connections as you specify in concurrency (&#8220;-c&#8221;) and make the total number of quests through those few open TCP connections.</p>
<p>The utility is a simple but power tool for testing load balancers and web servers.Â  It doesn&#8217;t tend to reflect real-world usage, but it can be useful for baseline testing and troubleshooting.Â  I&#8217;ve found it quite useful over the years.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2009/02/05/quick-and-dirty-performance-testing-with-apache-bench/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Definition Mission</title>
		<link>http://lbdigest.com/2008/05/17/definition-mission/</link>
		<comments>http://lbdigest.com/2008/05/17/definition-mission/#comments</comments>
		<pubDate>Sat, 17 May 2008 12:24:08 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Load Balancing 101]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=136</guid>
		<description><![CDATA[There are a couple of terms in the realm of server load balancing (application delivery controllers) that can be somewhat confusing, because either there are multiple names for the same...]]></description>
			<content:encoded><![CDATA[<p>There are a couple of terms in the realm of server load balancing (application delivery controllers) that can be somewhat confusing, because either there are multiple names for the same concept, or the same name means multiple concepts. I&#8217;m going to go over a few, to see if it helps clear things up a bit:</p>
<p><strong>SNAT (Source NAT)</strong></p>
<p>Source NAT is a term that are most often used to refer to two similar yet distinct concepts:</p>
<ol>
<li>An IP address (or pool of IP addresses), typically on a publicly routed address space, used to allow servers behind a load balancer, typically on a non-routed RFC1918 address space, to make  <strong>outbound</strong> connections to the Internet.</li>
<li>An IP address (or pool of IP addresses) that resides on the load balancer used to make connections to the web server, making it appear that all requests come from the load balancer (as opposed to the actual client IP).  Another term used in this scenario is <strong>full-NAT</strong>.</li>
</ol>
<p>Scenario 1 Example: Let&#8217;s say you have a couple of web servers sitting on a non-routed IP address space (such as 192.168.1.0/24).   The load balancer is handling inbound NAT, NATing from the public Internet to the private address space.  However, the servers also need to be able to make outbound connections.  That is, connections that originate from the servers to some IP address on the public Internet (to download Microsoft patches, for example). To do this, you would set up a public IP address on the load balancer to act as a source NAT, the very same way a Linksys wireless router would.  To hosts on the Internet, it would appear as if the connections were coming from this source NAT IP.</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2008/05/outboundsnat.png"><img class="alignnone size-medium wp-image-137 aligncenter" title="outboundsnat" src="http://lbdigest.com/wp-content/uploads/2008/05/outboundsnat-248x300.png" alt="" width="248" height="300" /></a></p>
<p>Scenario 2 Example:  Because of some network or other logistical requirement, you cannot make the load balancer the default gateway of the servers.  The very basics of load balancing require that you make sure traffic hits the load balancer on the way out (with the exception of DSR).  The solution is to use a source NAT IP on the load balancer to proxy requests.  This makes it look like all the HTTP connections and requests are coming from the load balancer.  It doesn&#8217;t matter what the default gateway of the servers is, so long as there&#8217;s IP connectivity to the servers.  The servers don&#8217;t even need to be on the same subnet as the load balancer with a source NAT.  This can cause problems with some web logging applications (there are solutions to this), but it often greatly simplifies how a load balancer is placed in a network.</p>
<p><strong>Persistence</strong></p>
<p>When persistence is mentioned in the context of load balancing, it&#8217;s a pretty familiar term.  Also referred to as <strong>sticky</strong> or <strong>server affinity</strong>, it&#8217;s the process of bypassing the normal load balancing algorithm and sending a given user <em>to the same server</em> each time that user makes a request.  This is a requirement for web applications that are stateful (and the vast majority of them are).</p>
<p>Persistence is also a term used in the HTTP protocol, and it means something very different than load balancer persistence.  With HTTP persistence, multiple requests are made through the same TCP connection, and it&#8217;s part of the HTTP 1.1 specification.  In HTTP 1.0, a separate TCP connection was made for <em>each object fetched</em>.  This meant that an HTML page with 20 images on it would require 21 separate TCP connections (20 images + HTML page).</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2008/05/httppersistence.png"><img class="alignnone size-medium wp-image-138 aligncenter" title="httppersistence" src="http://lbdigest.com/wp-content/uploads/2008/05/httppersistence-294x300.png" alt="" width="294" height="300" /></a></p>
<p>This was rather wasteful, since the objects could be as small as a kilobyte or two.  With HTTP 1.1, persistence allowed multiple objects pulled per page, so only 1 TCP connection would be required to pull a page and its 20 images.</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2008/05/httppersistence11.png"><img class="alignnone size-medium wp-image-139 aligncenter" title="httppersistence11" src="http://lbdigest.com/wp-content/uploads/2008/05/httppersistence11-269x300.png" alt="" width="269" height="300" /></a></p>
<p style="text-align: left;"><strong>Transparent</strong></p>
<p style="text-align: left;">Transparent can mean a couple of different things depending on what specific concept you&#8217;re talking about.  With several load balancer products, the term transparent is used to refer to whether or not the true source IP address of a client is preserved or hidden.</p>
<ul>
<li>Transparent:  The source IP address of the client is preserved.  Web servers see connections coming from the actual clients.  This is also referred to as <strong>half-NAT</strong>.</li>
<li>Non-transparent: The source IP address of the client is not preserved.  Web servers see connections coming from a <strong>source NAT</strong> IP address on the load balancer.  This is also referred to as <strong>full-NAT</strong>.</li>
</ul>
<p>Transparent is called half-NAT, because either the source IP address or the destination IP address is changed by the load balancer, but not both.  Non-transparent is called full-NAT because <em>both</em> the source and destination IP addresses are changed.</p>
<p>Transparent can also mean how the load balancer is deployed in a network.  In the firewall world, a &#8220;transparent firewall&#8221; is a firewall that is setup like a load balancer in bridge-mode.  It intercepts traffic purely by being in the Layer 2 path, instead of the Layer 3.  This is sometimes used in load balancer terminology, but not often.</p>
<p>If you have any other terms that you might be confused with, drop me a line and I&#8217;ll see if I can&#8217;t make a post out of it: tony [at] lbdigest [dot] com.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/05/17/definition-mission/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

