<?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; Quick Guide</title>
	<atom:link href="http://lbdigest.com/category/quick-guide/feed/" rel="self" type="application/rss+xml" />
	<link>http://lbdigest.com</link>
	<description>Server Load Balancing Articles and News</description>
	<lastBuildDate>Thu, 12 Aug 2010 23:32:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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 an HTTP client, it will of course work with any server, not just Apache-based servers....]]></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>Part-Time Regex&#8217;r? Regex Coach</title>
		<link>http://lbdigest.com/2008/04/21/part-time-regexr-regex-coach/</link>
		<comments>http://lbdigest.com/2008/04/21/part-time-regexr-regex-coach/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 14:07:21 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Quick Guide]]></category>
		<category><![CDATA[Tech Notes]]></category>

		<guid isPermaLink="false">http://lbdigest.com/?p=120</guid>
		<description><![CDATA[I deal with regex enough to need to know a beginning to intermediate level of knowledge, but I don&#8217;t use it enough to be able to form regex statements without thinking. Or in load balancing terms, it&#8217;s not burned into my brain ASIC. Every time...]]></description>
			<content:encoded><![CDATA[<p>I deal with regex enough to need to know a beginning to intermediate level of knowledge, but I don&#8217;t use it enough to be able to form regex statements without thinking. Or in load balancing terms, it&#8217;s not burned into my brain ASIC.  Every time I do regex, I&#8217;m doing it purely in software.</p>
<p>So what&#8217;s a part-time regex&#8217;r to do?  Like any good professional, I cheat.  I use a great little tool called <a href="http://weitz.de/regex-coach/">Regex Coach</a>.</p>
<p>It&#8217;s great little graphical tool that lets you take an example string and test (in real time) your regex statement.</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2008/04/regexcoach1.png"><img class="alignnone size-medium wp-image-122" title="regexcoach1" src="http://lbdigest.com/wp-content/uploads/2008/04/regexcoach1-279x300.png" alt="" width="279" height="300" /></a></p>
<p>It handles splits, fields, and all of the other regex madness that you might need help with.</p>
<p>Update: Reader Jason Williams pointed out another great little Regex tool <a href="http://kodos.sourceforge.net/">called Kodos</a>.Â  Similar in function, it&#8217;s got some neat features like automatic code generation.</p>
<p style="text-align: center;"><a href="http://lbdigest.com/wp-content/uploads/2008/04/kodos.png"><img class="alignnone size-medium wp-image-126" title="kodos" src="http://lbdigest.com/wp-content/uploads/2008/04/kodos-242x300.png" alt="" width="242" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2008/04/21/part-time-regexr-regex-coach/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>We Can All Get Along</title>
		<link>http://lbdigest.com/2007/02/27/we-can-all-get-along/</link>
		<comments>http://lbdigest.com/2007/02/27/we-can-all-get-along/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 16:50:40 +0000</pubDate>
		<dc:creator>tony</dc:creator>
				<category><![CDATA[Feature Articles]]></category>
		<category><![CDATA[Newcomer Series]]></category>
		<category><![CDATA[Quick Guide]]></category>

		<guid isPermaLink="false">http://lbdigest.com/2007/02/27/we-can-all-get-along/</guid>
		<description><![CDATA[In large to medium sized organizations, those responsible for load balancers typically are in the networking group. However, because of the rather unique function of load balancers, their operation is tied closely to the applications in ways that switches, routers, and even firewalls aren&#8217;t. To...]]></description>
			<content:encoded><![CDATA[<p>In large to medium sized organizations, those responsible for load balancers typically are in the networking group.  However, because of the rather unique function of load balancers, their operation is tied closely to the applications in ways that switches, routers, and even firewalls aren&#8217;t.</p>
<p>To fully understand load balancers require skills from career paths that don&#8217;t typically converge:  Those of a server administrator (and application developer) and those of a network engineer.</p>
<p>This strange convergence in skill requirements often means that load balancers are misunderstood.  It&#8217;s one of the reasons why &#8220;<a href="http://www.oreillynet.com/pub/a/oreilly/networking/news/slb_0301.html">It&#8217;s always the load balancer</a>&#8220;.</p>
<p>I&#8217;ve found though that there are a few concepts and tricks that if learned by opposing skill sets can go a long way into understanding/dealing with/troubleshooting load balancing technology.</p>
<p><em><strong>What a network engineer load balancer administrator needs to know about servers</strong></em></p>
<ul>
<li>Default routes of the servers.  I donâ€™t keep statistics on the hundreds of issues Iâ€™ve diagnosed over the years, but Iâ€™d guess fully 50% involved default routes on the servers as either the primary problem, or a related problem.  This is true for every vendor Iâ€™ve worked with (or for).</li>
</ul>
<ul>
<li>Learn to use <a href="http://livehttpheaders.mozdev.org/">liveHTTP headers</a> for Firefox and/or <a href="http://www.blunck.info/iehttpheaders.html">ieHTTPheaders</a> for Internet Explorer.  This shows you exactly what the server is doing, and can help you answer questions like â€œwhy is the load balancer redirecting me to Google?â€ (The answer is no, itâ€™s not, the application is doing that, and hereâ€™s the HTTP 302 in the header to prove it.)</li>
</ul>
<ul>
<li>If youâ€™re setting up a non-transparent setup (known as full-NAT) where the IP address of the web clients are hidden, make sure that your server people are aware of this (and OK with this).  Otherwise, when the server people call asking where the IP addresses of their clients are, and you have to explain to them that the IPs are lost forever, and that the load balancer doesnâ€™t log them, itâ€™s going to get unpleasant.</li>
</ul>
<ul>
<li>Setup <a href="http://vegan.net/MRTG">MRTG</a> for your load balancer.  Pull as many stats as you can get your grubby little paws on.</li>
</ul>
<p><strong><em>What a server admin/application developer needs to know about load balancers</em></strong></p>
<ul>
<li>If youâ€™ve got a tricky problem that can be solved by a solution in a load balancer and in an application, <em>do it in an application</em>.  It may seem seductive to have the load balancer take care of specialized cases with specialized URL parsing or redirects, but it can greatly complicate your setup.    For one thing, you have to go to a different group in order to make a change.  This doesnâ€™t include the core functionality of load balancers, such as cookie persistence of course.</li>
</ul>
<ul>
<li>Know how to do a network capture, using <a href="http://www.tcpdump.org/">TCPDump</a> or <a href="http://www.winpcap.org/windump/">WindDump</a>.    This is a language network engineers understand, and even if you donâ€™t understand what it means, the network group can often pick through it and figure it out.  It would help greatly to learn to parse it yourself, as well.  It would help to know how to read <a href="http://www.ethereal.com/">Ethereal</a> (available for Linux/BSD/Unix and Windows).</li>
</ul>
<ul>
<li>Load balancers donâ€™t log client connections.  Thereâ€™s only one load balancer that I know of that could even configure such logging, but it wouldnâ€™t be recommended and would likely impact performance.</li>
</ul>
<p>Have a tip?  Leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://lbdigest.com/2007/02/27/we-can-all-get-along/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
