<?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>Racker Hacker &#187; web</title>
	<atom:link href="http://rackerhacker.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Wed, 16 May 2012 12:55:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Performance and redundancy boost for icanhazip.com</title>
		<link>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/</link>
		<comments>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 23:30:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3310</guid>
		<description><![CDATA[It's been a few years since I started a little project to operate a service to return your IPv4 and IPv6 address. Although there are a bunch of other sites that offer this service as well, I've been amazed by the gradually increasing traffic to icanhazip.com. Here's a sample of the latest statistics: Hits per [...]<p><a href="http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/">Performance and redundancy boost for icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's been a few years since I started <a href="/2009/07/31/get-the-public-facing-ip-for-any-server-with-icanhazip-com/">a little project</a> to operate a service to return your IPv4 and IPv6 address.  Although there are a bunch of other sites that offer this service as well, I've been amazed by the gradually increasing traffic to <a href="http://icanhazip.com/">icanhazip.com</a>.</p>
<p>Here's a sample of the latest statistics:</p>
<ul>
<li>Hits per day: <strong>1.8 million</strong> (about 21 hits/second)</li>
<li>Unique IP addresses per day: <strong>25,555</strong></li>
<li>Hits per day from IPv6 addresses: <strong>1,069</strong> (a little sad)</li>
<li>Bandwidth used per day: <strong>~ 400MB</strong></li>
</ul>
<p>The site is now running on multiple <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/">Cloud Servers</a> at <a href="http://www.rackspace.com/cloud/">Rackspace</a> behind a <a href="http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/">load balancer cluster</a>.  In addition, the DNS records are hosted with Rackspace's <a href="http://www.rackspace.com/cloud/cloud_hosting_products/dns/">Cloud DNS</a> service.</p>
<p>This should allow the site to reply more quickly and reliably.  If you have suggestions for other improvements, let me know!</p>
<p><a href="http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/">Performance and redundancy boost for icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>mysql-json-bridge: a simple JSON API for MySQL</title>
		<link>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/</link>
		<comments>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 02:34:53 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3248</guid>
		<description><![CDATA[My quest to get better at Python led me to create a new project on GitHub. It's called mysql-json-bridge and it's ready for you to use. Why do we need a JSON API for MySQL? The real need sprang from a situation I was facing daily at Rackspace. We have a lot of production and [...]<p><a href="http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/">mysql-json-bridge: a simple JSON API for MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>My quest to get better at <a href="http://python.org">Python</a> led me to create a new project on GitHub.  It's called <a href="https://github.com/rackerhacker/mysql-json-bridge">mysql-json-bridge</a> and it's ready for you to use.</p>
<p><b>Why do we need a JSON API for MySQL?</b><br />
The real need sprang from a situation I was facing daily at <a href="http://rackspace.com/">Rackspace</a>.  We have a lot of production and pre-production environments which are in flux but we need a way to query data from various MySQL servers for multiple purposes.  Some folks need data in ruby or python scripts while others need to drag in data with .NET and Java.  Wrestling with the various adapters and all of the user privileges on disparate database servers behind different firewalls on different networks was less than enjoyable.</p>
<p>That's where this bridge comes in.</p>
<p>The bridge essentially gives anyone the ability to talk to multiple database servers across different environments by talking to a single endpoint with easily configurable security and encryption.  As long as the remote user can make an HTTP POST and parse some JSON, they can query data from multiple MySQL endpoints.</p>
<p><b>How does it work?</b><br />
It all starts with a simple HTTP POST.  I've become a big fan of the Python <a href="http://python-requests.org">requests</a> module.  If you're using it, this is all you need to submit a query:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> requests
payload = <span style="color: black;">&#123;</span><span style="color: #483d8b;">'sql'</span>: <span style="color: #483d8b;">'SELECT * FROM some_tables WHERE some_column=some_value'</span><span style="color: black;">&#125;</span>
url = <span style="color: #483d8b;">&quot;http://localhost:5000/my_environment/my_database&quot;</span>
r = requests.<span style="color: black;">post</span><span style="color: black;">&#40;</span>url, data=payload<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> r.<span style="color: black;">text</span></pre></div></div>

<p>The bridge takes your query and feeds it into the corresponding MySQL server.  When the results come back, they're converted to JSON and returned via the same HTTP connection.</p>
<p><b>What technology does it use?</b><br />
<a href="http://flask.pocoo.org/">Flask</a> does the heavy lifting for the HTTP requests and <a href="https://github.com/facebook/tornado/blob/master/tornado/database.py">Facebook's Tornado database class</a> wraps the <a href="http://mysql-python.sourceforge.net/">MySQLdb</a> module in something a little more user friendly.  Other than those modules, <a href="http://pyyaml.org/">PyYAML</a> and <a href="http://python-requests.org">requests</a> are the only other modules not provided by the standard Python libraries.</p>
<p><b>Is it fast?</b><br />
Yes.  I haven't done any detailed benchmarks on it yet, but the overhead is quite low even with a lot of concurrency.  The biggest slowdowns come from network latency between you and the bridge or between the bridge and the database server.  Keep in mind that gigantic result sets will take a longer time to transfer across the network and get transformed into JSON.</p>
<p><b>I found a bug.  I have an idea for an improvement.  You're terrible at Python.</b><br />
All feedback (and every pull request) is welcome.  I'm still getting the hang of Python (hey, I've only been writing in it seriously for a few weeks!) and I'm always eager to learn a new or better way to accomplish something.  Feel free to create an issue in GitHub or submit a pull request with a patch.</p>
<p><a href="http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/">mysql-json-bridge: a simple JSON API for MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five years of rackerhacker.com</title>
		<link>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/</link>
		<comments>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 14:45:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3085</guid>
		<description><![CDATA[Today marks the fifth year that this blog has existed on the internet. I bought the domain on February 14th, 2007 and tossed together a quick WordPress installation (I can't even remember the version now!) to hold my notes that I was gathering at work. At the time, I had recently parted ways with a [...]<p><a href="http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/">Five years of rackerhacker.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Today marks the fifth year that this blog has existed on the internet.  I bought the domain on February 14th, 2007 and tossed together a quick WordPress installation (I can't even remember the version now!) to hold my notes that I was gathering at work.<br />
<div id="attachment_3092" class="wp-caption alignright" style="width: 310px"><a href="http://rackerhacker.com/wp-content/uploads/2012/02/birthday_cake.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/02/birthday_cake-300x199.jpg" alt="Birthday Cake" title="Birthday Cake" width="300" height="199" class="size-medium wp-image-3092" /></a><p class="wp-caption-text">Photo credit: <a href='http://www.flickr.com/photos/spool32/5045502202/'>Will Clayton</a></p></div>At the time, I had recently parted ways with a very small internet startup and joined the ranks at <a href="http://rackspace.com/">Rackspace</a> as an entry-level Linux system administrator.  The abrupt change from "top dog at the startup" to "wow, I don't know anything about Linux" caught me by surprise and I was trying to stuff as much knowledge into my brain as quickly as I could.  My teammates at Rackspace were eager to show me the ropes of wrangling servers and supporting customers.</p>
<p>As I mentioned already, the blog started out just as a place to stuff my notes from the things I learned at work.  I figured that it would be nice to store it in a searchable format but it would also be great if I could link other people to certain posts if they needed more information to fix a problem.  It was a way to retain knowledge but yet give it back to the people around me who needed it.</p>
<p>The blog has hit 456 posts (this one is #457) and it's gone from a few page views per day to just over 20,000 per day.  Here are the top five most accessed posts (since I've been keeping stats):</p>
<ol>
<li><a href="/2008/11/02/syncing-an-iphone-with-a-new-mac-without-hassles/">Syncing an iPhone with a new Mac without hassles</a></li>
<li><a href="/2008/01/24/ip_conntrack-table-full-dropping-packet/">ip_conntrack: table full, dropping packet</a></li>
<li><a href="/2007/02/09/delete-single-iptables-rules/">Delete a single iptables rule</a></li>
<li><a href="/2007/01/24/increase-mysql-connection-limit/">Increase MySQL connection limit</a></li>
<li><a href="/2008/06/24/mysql-error-1040-too-many-connections/">MySQL Error 1040: too many connections</a></li>
</ol>
<p>I'd like to send out a big thanks to the people who read this blog, add comments (or complaints!), and suggest new topics.  You are the reason why I take the time to keep this blog going.</p>
<p><a href="http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/">Five years of rackerhacker.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using OpenSSL&#039;s s_client command with web servers using Server Name Indication (SNI)</title>
		<link>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/</link>
		<comments>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 14:07:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2998</guid>
		<description><![CDATA[One of the handiest tools in the OpenSSL toolbox is s_client. You can quickly view lots of details about the SSL certificates installed on a particular server and diagnose problems. For example, use this command to look at Google's SSL certificates: openssl s_client -connect encrypted.google.com:443 You'll see the chain of certificates back to the original [...]<p><a href="http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/">Using OpenSSL's s_client command with web servers using Server Name Indication (SNI)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the handiest tools in the OpenSSL toolbox is <code>s_client</code>.  You can quickly view lots of details about the SSL certificates installed on a particular server and diagnose problems.  For example, use this command to look at Google's SSL certificates:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">openssl s_client -connect encrypted.google.com:443</pre></div></div>

<p>You'll see the chain of certificates back to the original certificate authority where Google bought its certificate at the top, a copy of their SSL certificate in plain text in the middle, and a bunch of session-related information at the bottom.</p>
<p>This works really well when a site has one SSL certificate installed per IP address (this used to be a hard requirement).  With <a href="http://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication</a> (SNI), a web server can have multiple SSL certificates installed on the same IP address.  SNI-capable browsers will specify the hostname of the server they're trying to reach during the initial handshake process.  This allows the web server to determine the correct SSL certificate to use for the connection.</p>
<p>If you try to connect to rackerhacker.com with <code>s_client</code>, you'll find that you receive the default SSL certificate installed on my server and not the one for this site:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ openssl s_client -connect rackerhacker.com:443
Certificate chain
 0 s:/C=US/ST=Texas/L=San Antonio/O=MHTX Enterprises/CN=*.mhtx.net
   i:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA
 1 s:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA
   i:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority</pre></div></div>

<p>Add on the <code>-servername</code> argument and <code>s_client</code> will do the additional SNI negotiation step for you:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ openssl s_client -connect rackerhacker.com:443 -servername rackerhacker.com
Certificate chain
 0 s:/OU=Domain Control Validated/OU=PositiveSSL/CN=rackerhacker.com
   i:/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=PositiveSSL CA
 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=PositiveSSL CA
   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
 2 s:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root</pre></div></div>

<p>You may be asking yourself this question:</p>
<blockquote><p>Why doesn't the web server just use the <code>Host:</code> header that my browser sends already to figure out which SSL certificate to use?</p></blockquote>
<p>Keep in mind that the SSL negotiation must occur <b>prior</b> to sending the HTTP request through to the remote server.  That means that the browser and the server have to do the certificate exchange earlier in the process and the browser wouldn't get the opportunity to specify which site it's trying to reach.  SNI fixes that by allowing a <code>Host:</code> header type of exchange during the SSL negotiation process.</p>
<p><a href="http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/">Using OpenSSL's s_client command with web servers using Server Name Indication (SNI)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenStack bleeding-edge Python packages are now available</title>
		<link>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/</link>
		<comments>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 15:05:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2890</guid>
		<description><![CDATA[I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit. If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects: pypi.mhtx.net Python packages are updated moments after the [...]<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit.  If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects:</p>
<ul>
<li><a href="http://pypi.mhtx.net/">pypi.mhtx.net</a></li>
</ul>
<p>Python packages are updated moments after the commit is merged into the repositories under <a href="http://github.com/openstack">OpenStack's github account</a>.  </p>
<p>Although the packages will contain the latest code available, rest assured that the code has passed an initial code review (by humans), unit tests, and varying levels of functional or integrated testing.  There may still be a bug or two cropping up after that, so be aware of that as you utilize these packages.</p>
<p>The package versions utilize a standard format:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[package]-[version]-[git commit count]-[short commit hash]</pre></div></div>

<p>If you need to check the git log up to that particular commit, just run <code>git log</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">git log [short commit hash]</pre></div></div>

<p>Instructions for configuring <code>pip</code> or <code>easy_install</code> are provided <a href="http://pypi.mhtx.net/">within the repository</a>.</p>
<p>In addition, the repository is accessible via IPv4 and IPv6.</p>
<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lifehacker effect on icanhazip.com</title>
		<link>http://rackerhacker.com/2011/03/30/lifehacker-effect-on-icanhazip-com/</link>
		<comments>http://rackerhacker.com/2011/03/30/lifehacker-effect-on-icanhazip-com/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 13:28:55 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[icanhazip]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2246</guid>
		<description><![CDATA[I was surprised to see coverage about icanhazip.com on Lifehacker last Sunday and I was curious to know what effect the story would have on my site's overall traffic. Dave Drager wrote a great summary of what the site offers and how people can use it in their daily work. It's pretty obvious that icanhazip.com [...]<p><a href="http://rackerhacker.com/2011/03/30/lifehacker-effect-on-icanhazip-com/">Lifehacker effect on icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I was surprised to see coverage about <a href="http://rackerhacker.com/icanhazip-com-faq/">icanhazip.com</a> on <a href="http://www.lifehacker.com.au/2011/03/find-your-public-ip-anywhere-with-icanhazip-com/">Lifehacker</a> last Sunday and I was curious to know what effect the story would have on my site's overall traffic.  <a href="http://www.lifehacker.com.au/author/dave-drager/">Dave Drager</a> wrote a great summary of what the site offers and how people can use it in their daily work.  It's pretty obvious that icanhazip.com really only serves a niche group of internet users, but even I was surprised at the level of interest.</p>
<p><div id="attachment_2249" class="wp-caption alignright" style="width: 208px"><a href="http://rackerhacker.com/wp-content/uploads/2011/03/icanhazip_lifehacker_traffic.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/03/icanhazip_lifehacker_traffic.jpg" alt="Lifehacker Effect on icanhazip.com" title="Lifehacker Effect on icanhazip.com" width="198" height="119" class="size-full wp-image-2249" /></a><p class="wp-caption-text">icanhazip.com traffic data - March 2011</p></div>The graph on the right shows some recent traffic data from March 2011.  The Lifehacker story was published around 7AM on March 27th in Australia, so I first started seeing a spike on the 26th (my server's time zone is UTC-5).  The yellow bar is a count of the unique visits while the other bars count page views, hits and total bandwidth.</p>
<p>The count of unique visitors certainly increased (by about 10-11x), but the overall hits didn't increase by much.  I'd imagine that most visitors accessed the site, noticed that it displayed their public IP, and then they went on their way.  As I've said before, this site is easy to re-create and will really only serve a niche segment of internet users.</p>
<p>On most days, I'll receive a very high number of hits from a relatively small number of unique IP addresses.  There are quite a few people who check their public-facing IP address every second, but it seems like the majority stick to a more reasonable interval of 5-30 minutes.  I've yet to find the value in checking my public IP address once per second, but there are obviously some folks out there who find it valuable (or they aren't good at implementing sleeps in their scripts).</p>
<p>Here's a bit of trivia about the site for those who are interested:</p>
<ul>
<li>Almost 40% of the traffic to the site is from Eastern European and Asian countries</li>
<li>The average user on the site generates about 45 hits per day</li>
<li>Linux users make up 91% of the traffic on the site (based on user agent strings)</li>
<li>Over 88% of the hits to the site are requests made with curl or wget</li>
<li>Most traffic is received between 4-5PM CDT</li>
<li>Almost 98% of the visitors who reach the site do so via a direct link without a referrer</li>
</ul>
<p><a href="http://rackerhacker.com/2011/03/30/lifehacker-effect-on-icanhazip-com/">Lifehacker effect on icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/03/30/lifehacker-effect-on-icanhazip-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Throwing thoughtful &quot;403 Forbidden&quot; responses with apache</title>
		<link>http://rackerhacker.com/2010/11/17/throwing-thoughtful-403-forbidden-responses-with-apache/</link>
		<comments>http://rackerhacker.com/2010/11/17/throwing-thoughtful-403-forbidden-responses-with-apache/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 13:47:19 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1936</guid>
		<description><![CDATA[If you offer a web service that users query via scripts or other applications, you'll probably find that some people will begin to abuse the service. My icanhazip.com site is no exception. While many of the users have reasonable usage patterns, there are some users that query the site more than once per second from [...]<p><a href="http://rackerhacker.com/2010/11/17/throwing-thoughtful-403-forbidden-responses-with-apache/">Throwing thoughtful "403 Forbidden" responses with apache</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you offer a web service that users query via scripts or other applications, you'll probably find that some people will begin to abuse the service.  My <a href="http://icanhazip.com/">icanhazip.com</a> site is no exception.</p>
<p>While many of the users have reasonable usage patterns, there are some users that query the site more than once per second from the same IP address.  If you haven't used the site before, all it does is return your public IP address in plain text.  Unless your IP changes rapidly, you may not need to query the site more than a few times an hour.</p>
<p>I added the following to my icanhazip.com virtual host definition to get the message across to those users that abuse the service:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">ErrorDocument</span> <span style="color: #ff0000;">403</span> <span style="color: #7f007f;">&quot;No can haz IP. Stop abusing this service. <span style="color: #000099; font-weight: bold;">\</span>
    Contact major at mhtx dot net for details.&quot;</span>
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteCond</span> %{REMOTE_ADDR} ^12.23.34.45$ [OR]
<span style="color: #00007f;">RewriteCond</span> %{REMOTE_ADDR} ^98.87.76.65$
<span style="color: #00007f;">RewriteRule</span> .* nocanhaz [F]</pre></div></div>

<p>The users that are caught on the business end of these 403 responses will see something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ curl -i icanhazip.com
HTTP/1.1 403 Forbidden
Date: Wed, 17 Nov 2010 13:42:55 GMT
Server: Apache
Content-Length: 84
Connection: close
Content-Type: text/html; charset=iso-8859-1
&nbsp;
No can haz IP. Stop abusing this service. Contact major at mhtx dot net for details.</pre></div></div>

<p><a href="http://rackerhacker.com/2010/11/17/throwing-thoughtful-403-forbidden-responses-with-apache/">Throwing thoughtful "403 Forbidden" responses with apache</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/11/17/throwing-thoughtful-403-forbidden-responses-with-apache/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Switching from GlusterFS to DRBD and OCFS2</title>
		<link>http://rackerhacker.com/2010/11/10/switching-from-glusterfs-to-drbd-and-ocfs2/</link>
		<comments>http://rackerhacker.com/2010/11/10/switching-from-glusterfs-to-drbd-and-ocfs2/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 13:55:50 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[drbd]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[ocfs2]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1850</guid>
		<description><![CDATA[As my uptime reports have shown, and as some of you have reported, my blog's load time has increased steadily over the past few weeks. It turns out that one of my VM's was on a physical machine that had some trouble and I was reaching a point where GlusterFS's replicate functionality couldn't meet my [...]<p><a href="http://rackerhacker.com/2010/11/10/switching-from-glusterfs-to-drbd-and-ocfs2/">Switching from GlusterFS to DRBD and OCFS2</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>As my uptime reports have shown, and as some of you have reported, my blog's load time has increased steadily over the past few weeks.  It turns out that one of my VM's was on a physical machine that had some trouble and I was reaching a point where GlusterFS's replicate functionality couldn't meet my performance needs.</p>
<p>Instead of using <a href="http://en.wikipedia.org/wiki/GlusterFS">GlusterFS</a> as I had before in my <a href="/redundant-cloud-hosting-configuration-guide/">redundant cloud hosting guide</a>, I decided to use <a href="http://en.wikipedia.org/wiki/DRBD">DRBD</a> in dual-primary mode with <a href="http://en.wikipedia.org/wiki/OCFS">OCFS2</a> as the clustering filesystem on top of it.  The performance is quite good so far:</p>
<div id="attachment_1851" class="wp-caption aligncenter" style="width: 630px"><a href="http://rackerhacker.com/wp-content/uploads/2010/11/pingdomresponsetime-rackerhacker.com_.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/11/pingdomresponsetime-rackerhacker.com_.png" alt="Pingdom Response Time Graph for rackerhacker.com" title="Pingdom Response Time Graph for rackerhacker.com" width="620" height="339" class="size-full wp-image-1851" /></a><p class="wp-caption-text">Pingdom Response Time Graph for rackerhacker.com</p></div>
<p>I switched over the DNS late last night and the response time has fallen from the two to three second range (during times of low load) to right around one second per request.  In addition to the reduced load times, I can support higher concurrency without significant performance degradation.</p>
<p>Don't worry - I'll make a detailed post on this topic later along with a guide on how to set it up yourself.</p>
<p><a href="http://rackerhacker.com/2010/11/10/switching-from-glusterfs-to-drbd-and-ocfs2/">Switching from GlusterFS to DRBD and OCFS2</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/11/10/switching-from-glusterfs-to-drbd-and-ocfs2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A simple guide to redundant cloud hosting</title>
		<link>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/</link>
		<comments>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:41:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1771</guid>
		<description><![CDATA[Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago. I've written a guide on how to host a web application redundantly in a cloud environment. While it's still a bit of a rough draft, it should be a good starting point for those [...]<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago.  I've <a href="/redundant-cloud-hosting-configuration-guide/">written a guide</a> on how to host a web application redundantly in a cloud environment.  While it's still a bit of a rough draft, it should be a good starting point for those who haven't worked in virtualized environments before.  Also, it may show some of the more experienced systems administrators a new way to do things.</p>
<p>The guide: <a href="/redundant-cloud-hosting-configuration-guide/">Redundant Cloud Hosting Guide</a></p>
<p>As always, if you find anything in the guide that needs improvement, I'm all ears. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>One month with GlusterFS in production</title>
		<link>http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/</link>
		<comments>http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:29:02 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1680</guid>
		<description><![CDATA[As many of you might have noticed from my previous GlusterFS blog post and my various tweets, I've been working with GlusterFS in production for my personal hosting needs for just over a month. I've also been learning quite a bit from some of the folks in the #gluster channel on Freenode. On a few [...]<p><a href="http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/">One month with GlusterFS in production</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>As many of you might have noticed from my <a href="/2010/05/27/glusterfs-on-the-cheap-with-rackspaces-cloud-servers-or-slicehost/">previous GlusterFS blog post</a> and my <a href="http://twitter.com/rackerhacker">various tweets</a>, I've been working with GlusterFS in production for my personal hosting needs for just over a month.  I've also been learning quite a bit from some of the folks in the <a href="http://java.freenode.net/index.php?channel=gluster">#gluster</a> channel on <a href="http://freenode.net/">Freenode</a>.  On a few occasions I've even been able to help out with some configuration problems from other users.</p>
<p>There has been quite a bit of interest in GlusterFS as of late and I've been inundated with questions from coworkers, other system administrators and developers.  Most folks want to know about its reliability and performance in demanding production environments.  I'll try to do my best to cover the big points in this post.</p>
<p><strong>First off, here's now I'm using it in production:</strong> I have two web nodes that keep content in sync for various web sites.  They each run a GlusterFS server instance and they also mount their GlusterFS share.  I'm using the <a href="http://www.gluster.com/community/documentation/index.php/Translators/cluster/replicate">replicate translator</a> to keep both web nodes in sync with client side replication.</p>
<p>Here are my impressions after a month:</p>
<p><b>I/O speed is often tied heavily to network throughput</b><br />
This one may seem obvious, but it's not always true in all environments.  If you deal with a lot of small files like I do, a 40mbit/sec link between the Xen guests is plenty.  Adding extra throughput didn't add any performance to my servers.  However, if you wrangle large files on your servers regularly, you may want to consider higher throughput links between your servers.  I was able to push just under 900mbit/sec by using dd to create a large file within a GlusterFS mount.</p>
<p><b>Network and I/O latency are big factors for small file performance</b><br />
If you have a busy network and the latency creeps up from time to time, you'll find that your small file performance will drop significantly (especially with the replicate translator).  Without getting too nerdy (you're welcome to read the <a href="http://ftp.zresearch.com/pub/gluster/glusterfs/doc/afr.pdf">technical document on replication</a>), replication is an intensive process.  When a file is accessed, the client goes around to each server node to ensure that it not only has a copy of the file being read, but that it has the <em>correct</em> copy.  If a server didn't save a copy of a file (due to disk failure or the server being offline when the file was written), it has to be synced across the network from one of the good nodes.</p>
<p>When you write files on replicated servers, the client has to roll through the same process first.  Once that's done, it has to lock the file, write to the change log, then do the write operation, drop the change log entries, and then unlock the file.  All of those operations must be done on <em>all of the servers</em>.  High latency networks will wreak havoc on this process and cause it to take longer than it should.</p>
<p>It's quite obvious that if you have a fast, low-latency network between your servers, slow disks can still be a problem.  If the client is waiting on the server nodes' disks to write data, the read and write performance will suffer.  I've tested this in environments with fast networks and very busy RAID arrays.  Even if the network was very underutilized, slow disks could cut performance drastically.</p>
<p><b>Monitoring GlusterFS isn't easy</b><br />
When the client has communication problems with the server nodes, some weird things can happen.  I've seen situations where the client loses connections to the servers (see the next section on reliability) and the client mount simply hangs.  In other situations, the client has been knocked offline entirely and the process is missing from the process tree by the time I logged in.  Your monitoring will need to ensure that the mount is active and is responding in a timely fashion.</p>
<p>There's a <a href="http://www.sirgroane.net/2010/04/monitoring-gluster-with-nagios/">handy script</a> which allows you to monitor GlusterFS mounts via nagios that Ian Rogers put together.  Also, you can get some historical data with <a href="http://github.com/acrollet/munin-glusterfs">acrollet's munin-glusterfs plugin</a>.</p>
<p><b>GlusterFS 3.x is pretty reliable</b><br />
When I first started working with GlusterFS, I was using a version from the 2.x tree.  The Fedora package maintainer hadn't updated the package in quite some time, but I figured it should work well enough for my needs.  I found that the small file performance was lacking and the nodes often had communication issues when many files were being accessed or written simultaneously.  This improved when I built my own RPMs of 3.0.4 (and later 3.0.5) and began using those instead.</p>
<p>I did some failure testing by hard cycling the server and client nodes and found some interesting results.  First off, abruptly pulling clients had no effects on the other clients or the server nodes.  The connection eventually timed out and the servers logged the timeout as expected. </p>
<p>Abruptly pulling servers led to some mixed results.  In the 2.x branch, I saw client hangs and timeouts when I abruptly removed a server.  This appears to be mostly corrected in the 3.x branch.  If you're using replicate, it's important to keep in mind that the first server volume listed in your client's volume file is the one that will be coordinating the file and directory locking.  Should that one fall offline quickly, you'll see a hiccup in performance for a brief moment and the next server will be used for coordinating the locking.  When your original server comes back up, the locking coordination will shift back.</p>
<p><b>Conclusion</b><br />
I'm really impressed with how much GlusterFS can do with the simplicity of how it operates.  Sure, you can get better performance and more features (sometimes) from something like Lustre or GFS2, but the amount of work required to stand up that kind of cluster isn't trivial.  GlusterFS really only requires that your kernel have FUSE support (it's been in mainline kernels since 2.6.14).</p>
<p>There are some things that GlusterFS really needs in order to succeed:</p>
<ul>
<li><b>Documentation</b> - The current documentation is often out of date and confusing.  I've even found instances where the documentation contradicts itself.  While there are some good technical documents about the design of some translators, they really ought to do some more work there.</li>
<li><b>Statistics gathering</b> - It's very difficult to find out what GlusterFS is doing and where it can be optimized.  Profiling your environment to find your bottlenecks is nearly impossible with the 2.x and 3.x branches.  It doesn't make it easier when some of the performance translators actually decrease performance.</li>
<li><b>Community involvement</b> - This ties back into the documentation part a little, but it would be nice to see more participation from Gluster employees on IRC and via the mailing lists.  They're a little better with mailing list responses than other companies I've seen, but there is still room for improvement.</li>
</ul>
<p>If you're considering GlusterFS for your servers but you still have more questions, feel free to leave a comment or find me on Freenode (I'm 'rackerhacker').</p>
<p><a href="http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/">One month with GlusterFS in production</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>A modern implementation and explanation of Linux Virtual Server (LVS)</title>
		<link>http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/</link>
		<comments>http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 16:03:27 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1529</guid>
		<description><![CDATA[A typical load balancing configuration using hardware devices or software implementations will be organized such that they resemble the diagram at the right. I usually call this a proxy-type load balancing solution since the load balancer proxies your request to some other nodes. The standard order of operations looks like this: client makes a request [...]<p><a href="http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/">A modern implementation and explanation of Linux Virtual Server (LVS)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1533" class="wp-caption alignright" style="width: 207px"><a href="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-viaproxy.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-viaproxy.png" alt="Load balancing via proxy" title="Load balancing via proxy" width="197" height="206" class="size-full wp-image-1533" /></a><p class="wp-caption-text">Typical configuration for a <br />proxy-type load balancer</p></div>A typical load balancing configuration using hardware devices or software implementations will be organized such that they resemble the diagram at the right.  I usually call this a proxy-type load balancing solution since the load balancer proxies your request to some other nodes.  The standard order of operations looks like this:</p>
<ul>
<li>client makes a request</li>
<li>load balancer receives the request</li>
<li>load balancer sends request to a web node</li>
<li>the web server sends content back to the load balancer</li>
<li>the load balancer responds to the client</li>
</ul>
<p>If you're not familiar with load balancing, here's an analogy.  Consider a fast food restaurant.  When you walk up to the counter and place an order, you're asking the person at the counter (the load balancer) for a hamburger.  The person at the counter is going to submit your order, and then a group of people (web nodes) are going to work on it.  Once your hamburger (web request) is ready, your order will be given to the person at the counter and then back to you.</p>
<p>This style of organization can become a problem as your web nodes begin to scale.  It requires you to ensure that your load balancers can keep up with the requests and sustain higher transfer rates that come from having more web nodes serving a greater number of requests.  Imagine the fast food restaurant where you have one person taking the orders but you have 30 people working on the food.  The person at the counter may be able to take orders very quickly, but they may not be able to keep up with the orders coming out of the kitchen.</p>
<p><div id="attachment_1532" class="wp-caption alignright" style="width: 226px"><a href="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-ipvs.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-ipvs.png" alt="Load balancing via Linux Virtual Server" title="Load balancing via Linux Virtual Server" width="216" height="206" class="size-full wp-image-1532" /></a><p class="wp-caption-text">LVS allows for application servers<br /> to respond to clients directly</p></div><br />
This is where <a href="http://en.wikipedia.org/wiki/Linux_Virtual_Server">Linux Virtual Server (LVS)</a> really shines.  LVS operates a bit differently:</p>
<ul>
<li>client makes a request</li>
<li>load balancer receives the request</li>
<li>load balancer sends request to a web node</li>
<li>the web server sends the response <strong>directly to the client</strong></li>
</ul>
<p>The key difference is that the load balancer sends the unaltered request to the web server and the web server responds <em>directly to the client</em>.  Here's the fast food analogy again.  If you ask the person at the counter (the load balancer) for a hamburger, that person is going to take your order and give it to the kitchen staff (the web nodes) to work on it.  This time around, the person at the counter is going to advise the kitchen staff that the order needs to go directly to you once it's complete.  When your hamburger is ready, a member of the kitchen staff will walk to the counter and give it directly to you.</p>
<p>In the fast food analogy, what are the benefits?  As the number of orders and kitchen staff increases, the job of the person at the counter doesn't drastically increase in difficulty.  While that person will have to handle more orders and keep tabs on which of the kitchen staff is working on the least amount of orders, they don't have to worry about returning food to customers.  Also, the kitchen staff doesn't need to waste time handing orders to the person at the counter.  Instead, they can pass these orders directly to the customer that ordered them.</p>
<p>In the world of servers, this is a large benefit.  Since the web servers' responses no longer pass through the load balancer, they can spend more time on what they do best -- balancing traffic.  This allows for smaller, lower-powered load balancing servers from the beginning.  It also allows for increases in web nodes without big changes for the load balancers.</p>
<p>There are three main implementations of LVS to consider:</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2010/06/Lvslogo.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/Lvslogo.png" alt="Linux Virtual Server Logo" title="Linux Virtual Server Logo" width="206" height="206" class="alignright size-full wp-image-1559" /></a><strong>LVS-DR: Direct Routing</strong><br />
The load balancer receives the request and sends the packet directly to a waiting real server to process.  LVS-DR has the best performance, but all of your servers must be on the same network subnet and they have to be able to share the same router (with no other routing devices in between them).</p>
<p><strong>LVS-TUN: Tunneling</strong><br />
This is very similar to the direct routing approach, but the packets are <a href="http://en.wikipedia.org/wiki/IP_tunnel">encapsulated</a> and sent directly to the real servers once the load balancer receives them.  This removes the restriction that all of the devices must be on the same network.  Thanks to encapsulation, you can use this method to load balance between multiple datacenters.</p>
<p><strong>LVS-NAT: Network Address Translation</strong><br />
Using NAT for LVS yields the least performance and scaling of all of the implementation options.  In this configuration, the incoming requests are rewritten so that they will be transported correctly in a NAT environment.  This puts a bigger burden on the load balancer as it must rewrite the requests quickly while still keeping up with how much work is being done by each web server.</p>
<hr />
<strong>Looking for a Linux Virtual Server HOWTO?</strong> Stay tuned.  I'm preparing one for my next post.</p>
<p><a href="http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/">A modern implementation and explanation of Linux Virtual Server (LVS)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Apache 2.2: internal dummy connection</title>
		<link>http://rackerhacker.com/2008/09/23/apache-22-internal-dummy-connection/</link>
		<comments>http://rackerhacker.com/2008/09/23/apache-22-internal-dummy-connection/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 01:42:21 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=465</guid>
		<description><![CDATA[After working with some RHEL 5 servers fairly regularly, I noticed a reduction in Apache 2.2 performance when many connections were made to the server. There were messages like these streaming into the access_log as well: 127.0.0.1 - - [21/Aug/2008:12:00:10 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)" 127.0.0.1 - [...]<p><a href="http://rackerhacker.com/2008/09/23/apache-22-internal-dummy-connection/">Apache 2.2: internal dummy connection</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>After working with some RHEL 5 servers fairly regularly, I noticed a reduction in Apache 2.2 performance when many connections were made to the server.  There were messages like these streaming into the access_log as well:</p>
<p><code>127.0.0.1 - - [21/Aug/2008:12:00:10 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"<br />
127.0.0.1 - - [21/Aug/2008:12:00:11 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"<br />
127.0.0.1 - - [21/Aug/2008:12:00:13 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"<br />
127.0.0.1 - - [21/Aug/2008:12:00:14 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"<br />
127.0.0.1 - - [21/Aug/2008:12:00:15 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"</code></p>
<p>On servers with ipv6 enabled, you might see a line like this one:</p>
<p><code>::1 - - [21/Aug/2008:12:00:15 -0400] "GET / HTTP/1.0" 200 2269 "-" "Apache/2.2.3 (Red Hat) (internal dummy connection)"</code></p>
<p>I began to wonder why Apache was making these connections back onto itself and initiating a <code>GET /</code>.  Apache's <a href="http://wiki.apache.org/httpd/InternalDummyConnection">documentation</a> had the following:</p>
<blockquote><p>When the Apache HTTP Server manages its child processes, it needs a way to wake up processes that are listening for new connections. To do this, it sends a simple HTTP request back to itself. This request will appear in the access_log file with the remote address set to the loop-back interface (typically 127.0.0.1 or ::1 if IPv6 is configured). If you log the User-Agent string (as in the combined log format), you will see the server signature followed by "(internal dummy connection)" on non-SSL servers. During certain periods you may see up to one such request for each httpd child process.</p>
<p>These requests are perfectly normal and you do not, in general, need to worry about them. They can simply be ignored.</p></blockquote>
<p>Sure, I could easily ignore the requests, but the requests were increasing the load on my server more than I liked.  Apache's documentation suggested omitting the lines from the logs by adding the following to the Apache configuration:</p>
<p><code>SetEnvIf Remote_Addr "127\.0\.0\.1" loopback</code></p>
<p>And then adding <code>env=!loopback</code> to your <code>CustomLog</code> lines ensures that the data won't show up in your access logs.  However, you'll still end up with <code>Directory index forbidden by Options directive: /var/www/html/</code> filling up your error_logs.  A quick search revealed a <a href="http://www.inventivelabs.com.au/weblog/post/apache-s-internal-dummy-connection">handy mod_rewrite</a> rule to get rid of these requests as quickly as possible with the lowest effort required from Apache:</p>
<p><code>RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]<br />
RewriteRule .* - [F,L]</code></p>
<p>At this point, the requests to the localhost should receive a 403 immediately.  Since you can't keep Apache from sending all of these requests to itself, the best you can do is respond to them in a manner that requires the lowest possible resources.</p>
<p><a href="http://rackerhacker.com/2008/09/23/apache-22-internal-dummy-connection/">Apache 2.2: internal dummy connection</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/09/23/apache-22-internal-dummy-connection/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Compress your web content for better performance</title>
		<link>http://rackerhacker.com/2008/09/19/compress-your-web-content-for-better-performance/</link>
		<comments>http://rackerhacker.com/2008/09/19/compress-your-web-content-for-better-performance/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 17:00:47 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=479</guid>
		<description><![CDATA[Most web developers expend a lot of energy optimizing queries, reducing the overhead of functions, and streamlining their application's overall flow. However, many forget that one of the simplest adjustments is the compression of data as it leaves the web server. Luckily, mod_deflate makes this easy, and the Apache documentation has a handy initial configuration [...]<p><a href="http://rackerhacker.com/2008/09/19/compress-your-web-content-for-better-performance/">Compress your web content for better performance</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Most web developers expend a lot of energy optimizing queries, reducing the overhead of functions, and streamlining their application's overall flow.  However, many forget that one of the simplest adjustments is the compression of data as it leaves the web server.</p>
<p>Luckily, <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html">mod_deflate</a> makes this easy, and the Apache documentation has a <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html#recommended">handy initial configuration</a> available:</p>
<p><code>&lt;Location /&gt;<br />
SetOutputFilter DEFLATE<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html<br />
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
Header append Vary User-Agent env=!dont-vary<br />
&lt;/Location&gt;</code></p>
<p>This configuration will compress everything except for images.  Of course, you can't test this with curl, but you can test it with Firefox and <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">LiveHTTPHeaders</a>.  If you don't have Firefox handy, you can try a very handy <a href="http://www.gidnetwork.com/tools/gzip-test.php">web application</a> that will give you the statistics about the compression of your site's data.</p>
<p><a href="http://rackerhacker.com/2008/09/19/compress-your-web-content-for-better-performance/">Compress your web content for better performance</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/09/19/compress-your-web-content-for-better-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Plesk: Disabling TRACE/TRACK methods globally</title>
		<link>http://rackerhacker.com/2008/04/23/plesk-disabling-tracetrack-methods-globally/</link>
		<comments>http://rackerhacker.com/2008/04/23/plesk-disabling-tracetrack-methods-globally/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 23:40:50 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[plesk]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=292</guid>
		<description><![CDATA[UPDATE: The TRACE/TRACK methods are disabled in Plesk 8.4 right out of the box! It's always been a bit of a challenge to disable TRACE and TRACK methods with Plesk. The only available options were to create a ton of vhost.conf files or adjust the httpd.include files and prevent modifications with chattr (which is a [...]<p><a href="http://rackerhacker.com/2008/04/23/plesk-disabling-tracetrack-methods-globally/">Plesk: Disabling TRACE/TRACK methods globally</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><b>UPDATE:</b> The TRACE/TRACK methods are disabled in Plesk 8.4 right out of the box!</p>
<p>It's always been a <a href="http://rackerhacker.com/2007/08/28/apache-disable-trace-and-track-methods/">bit of a challenge</a> to disable TRACE and TRACK methods with Plesk.  The only available options were to create a ton of vhost.conf files or adjust the httpd.include files and prevent modifications with <code>chattr</code> (which is a bad idea on many levels).</p>
<p>Luckily, Parallels has made things easier with a <a href="http://kb.parallels.com/en/4638">new knowledge base article</a>.</p>
<p><a href="http://rackerhacker.com/2008/04/23/plesk-disabling-tracetrack-methods-globally/">Plesk: Disabling TRACE/TRACK methods globally</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/04/23/plesk-disabling-tracetrack-methods-globally/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Removing news feeds in Horde</title>
		<link>http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/</link>
		<comments>http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 18:36:49 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[horde]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/</guid>
		<description><![CDATA[If you've used newer versions of Horde with Plesk, you have probably noticed the news feed that runs down the left side of the screen. Depending on the types of e-mails you receive, you may get some pretty odd news popping up on the screen. Luckily, you can remove the news feeds pretty easily. Open [...]<p><a href="http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/">Removing news feeds in Horde</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you've used newer versions of Horde with Plesk, you have probably noticed the news feed that runs down the left side of the screen.  Depending on the types of e-mails you receive, you may get some pretty odd news popping up on the screen.</p>
<p>Luckily, you can remove the news feeds pretty easily.  Open the following file in your favorite text editor:</p>
<p><code>/usr/share/psa-horde/templates/portal/sidebar.inc</code></p>
<p>Once the file is open, drop down to line 102 and comment out the entire if() statement (lines 102-117).</p>
<p><strong>NOTE:</strong> If you upgrade Plesk, this change will most likely be reversed.</p>
<p><a href="http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/">Removing news feeds in Horde</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2008/01/21/removing-news-feeds-in-horde/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why you should use caching for WordPress blogs</title>
		<link>http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/</link>
		<comments>http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 18:09:42 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/</guid>
		<description><![CDATA[I had some time to do some testing of my blog's performance today, and I discovered how much of a difference the WP-Cache plugin makes. This blog runs on a server with dual Xeon Woodcrest CPU's, 64-bit CentOS 4.5 and a 100mbit network connection. Here's the first test with WP-Cache turned off: $ http_load -parallel [...]<p><a href="http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/">Why you should use caching for WordPress blogs</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I had some time to do some testing of my blog's performance today, and I discovered how much of a difference the <a href="http://mnm.uib.es/gallir/wp-cache-2/">WP-Cache</a> plugin makes.</p>
<p>This blog runs on a server with dual Xeon Woodcrest CPU's, 64-bit CentOS 4.5 and a 100mbit network connection.  Here's the first test with WP-Cache turned off:</p>
<p><code>$ http_load -parallel 10 -seconds 30 urltocheck.txt<br />
<strong>346</strong> fetches, 10 max parallel, 1.78616e+07 bytes, in 30 seconds<br />
51623.2 mean bytes/connection<br />
11.5333 fetches/sec, 595387 bytes/sec<br />
msecs/connect: 15.1661 mean, 16.97 max, 14.922 min<br />
msecs/first-response: 445.984 mean, 2328.82 max, 189.62 min<br />
HTTP response codes:<br />
  code 200 -- 346</code></p>
<p>346 fetches in 30 seconds is not a very exciting performance number for me.  That's just over 10 fetches per second, and on a busy day, I sometimes reach that number.  Also, while this test ran, the server's CPU usage was extremely high and over 80% of all four cores were in use.  The iowait was about 20% across the board.</p>
<p>I decided to turn on WP-Cache and give it another go with the same test:</p>
<p><code>$ http_load -parallel 10 -seconds 30 urltocheck.txt<br />
<strong>3482</strong> fetches, 10 max parallel, 1.79671e+08 bytes, in 30 seconds<br />
51600 mean bytes/connection<br />
116.067 fetches/sec, 5.98904e+06 bytes/sec<br />
msecs/connect: 15.2259 mean, 18.257 max, 14.891 min<br />
msecs/first-response: 20.7297 mean, 69.39 max, 18.861 min<br />
HTTP response codes:<br />
  code 200 -- 3482</code></p>
<p>Wow, that's a 10-fold improvement, and I can handle over 100 requests per second with 10 parallel requests.  Also, the iowait dropped to 5%, and overall CPU usage remained under 8%.</p>
<p>I kicked it up to 20 parallel connections and tried again:</p>
<p><code>$ http_load -parallel 20 -seconds 30 urltocheck.txt<br />
<strong>5817</strong> fetches, 20 max parallel, 3.02176e+08 bytes, in 30 seconds<br />
51947 mean bytes/connection<br />
193.9 fetches/sec, 1.00725e+07 bytes/sec<br />
msecs/connect: 17.9175 mean, 30.831 max, 14.911 min<br />
msecs/first-response: 24.5352 mean, 97.475 max, 18.978 min<br />
HTTP response codes:<br />
  code 200 -- 5817</code></p>
<p>Almost 194 connections served per second!  Also, the CPU usage was only at about 14% during the duration of the test.</p>
<p>I decided to tempt fate and see if I could blow the roof off the test with 50 parallel connections:</p>
<p><code>$ http_load -parallel 50 -seconds 30 urltocheck.txt<br />
<strong>5794</strong> fetches, 50 max parallel, 2.99718e+08 bytes, in 30 seconds<br />
51729 mean bytes/connection<br />
193.133 fetches/sec, 9.99059e+06 bytes/sec<br />
msecs/connect: 43.286 mean, 63.878 max, 14.942 min<br />
msecs/first-response: 68.967 mean, 202.854 max, 20.014 min<br />
HTTP response codes:<br />
  code 200 -- 5794</code></p>
<p>The performance suffered a bit, but the server was still pumping out almost 200 connections per second, and I'm okay with that. Well, unless anyone has a spare Cisco 11501 laying around that I could have. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   And, of course, one additional server.</p>
<p>Just as a sidenote, I installed <a href="http://www.zend.com/en/products/guard/optimizer/">Zend Optimizer v3.3</a> on the server and performance actually dropped by 1%-3% for each test.  I found that a bit surprising.</p>
<p><em>I used <a href="http://www.acme.com/software/http_load/">http_load</a> to perform the benchmarks after I found it on <a href="http://calebgroom.com/archives/185">Caleb's blog</a>.</em></p>
<p><a href="http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/">Why you should use caching for WordPress blogs</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/12/06/why-you-should-use-caching-for-wordpress-blogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Horde problems in Plesk 8.1.x/8.2.x with PHP 5.2.5</title>
		<link>http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/</link>
		<comments>http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 18:33:37 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[horde]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/</guid>
		<description><![CDATA[There's a few issues with PHP 5.2.5 and the version of Horde that is bundled with Plesk 8.1.x and 8.2.x. The PHP include paths that appear in the Apache configuration generated by Plesk conflict with the PHP installation, and that causes the Horde webmail interface to segmentation fault. To fix the problem, create a file [...]<p><a href="http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/">Fixing Horde problems in Plesk 8.1.x/8.2.x with PHP 5.2.5</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>There's a few issues with PHP 5.2.5 and the version of Horde that is bundled with Plesk 8.1.x and 8.2.x.  The PHP include paths that appear in the Apache configuration generated by Plesk conflict with the PHP installation, and that causes the Horde webmail interface to segmentation fault.</p>
<p>To fix the problem, create a file called /etc/httpd/conf.d/zz050a_horde_php_workaround.conf and put the following inside it:</p>
<p><code>&lt;DirectoryMatch /usr/share/psa-horde&gt;<br />
php_admin_value include_path "/usr/share/psa-horde/lib:/usr/share/psa-horde:/usr/share/psa-horde/pear:."<br />
&lt;/DirectoryMatch&gt;</code></p>
<p>Reload the Apache configuration and your Horde installation should work properly with PHP 5.2.5.</p>
<p><em>Credit for this fix goes to Kevin M.</em></p>
<p><a href="http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/">Fixing Horde problems in Plesk 8.1.x/8.2.x with PHP 5.2.5</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/11/28/fixing-horde-problems-in-plesk-81x82x-with-php-525/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Red Hat Perl Issues: unable to call function somefunction on undefined value</title>
		<link>http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/</link>
		<comments>http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 18:19:12 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/</guid>
		<description><![CDATA[Apparently, a recent Red Hat Enterprise Linux update for ES3, 4 and 5 caused some Perl applications to throw errors like these: unable to call function somefunction on undefined value Of course, replace somefunction with your function of choice. To correct the issue, you can force CPAN to bring back a more sane version of [...]<p><a href="http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/">Red Hat Perl Issues: unable to call function somefunction on undefined value</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Apparently, a recent Red Hat Enterprise Linux update for ES3, 4 and 5 caused some Perl applications to throw errors like these:</p>
<p><code>unable to call function <em>somefunction</em> on undefined value</code></p>
<p>Of course, replace <code>somefunction</code> with your function of choice.  To correct the issue, you can force CPAN to bring back a more sane version of Scalar::Util:</p>
<p><code># perl -MCPAN -e shell<br />
cpan&gt; force install Scalar::Util</code></p>
<p><a href="http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/">Red Hat Perl Issues: unable to call function somefunction on undefined value</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/11/19/red-hat-perl-issues-unable-to-call-function-somefunction-on-undefined-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change the default Apache character set</title>
		<link>http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/</link>
		<comments>http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 18:09:01 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/</guid>
		<description><![CDATA[By default, Red Hat Enterprise Linux 4 sets the default character set in Apache to UTF-8. Your specific web application may need for the character set to be set to a different value, and the change can be made fairly easily. Here's an example where the character set is changed to ISO-8859-1: First, adjust the [...]<p><a href="http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/">Change the default Apache character set</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>By default, Red Hat Enterprise Linux 4 sets the default character set in Apache to UTF-8.  Your specific web application may need for the character set to be set to a different value, and the change can be made fairly easily.  Here's an example where the character set is changed to ISO-8859-1:</p>
<p>First, adjust the AddDefaultCharset directive in /etc/httpd/conf/httpd.conf:</p>
<p><code>#AddDefaultCharset UTF-8<br />
AddDefaultCharset ISO-8859-1</code></p>
<p>Then, reload Apache and check your headers:</p>
<p><code># /etc/init.d/httpd reload<br />
# curl -I localhost<br />
HTTP/1.1 403 Forbidden<br />
Date: Thu, 08 Nov 2007 22:18:14 GMT<br />
Server: Apache/2.0.52 (Red Hat)<br />
Accept-Ranges: bytes<br />
Content-Length: 3985<br />
Connection: close<br />
Content-Type: text/html; charset=ISO-8859-1</code></p>
<p><em>This was tested on Red Hat Enterprise Linux 4 Update 5</em></p>
<p><a href="http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/">Change the default Apache character set</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/11/15/change-the-default-apache-character-set/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Plesk: Error opening /var/lib/squirrelmail/prefs/default_pref</title>
		<link>http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/</link>
		<comments>http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 00:44:48 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/</guid>
		<description><![CDATA[On brand new Plesk 8.2.x installations or on servers that have been upgraded to Plesk 8.2.x, you might run into this error when you attempt to log into squirrelmail after it was installed via RPM: Error opening /var/lib/squirrelmail/prefs/default_pref Could not create initial preference file! /var/lib/squirrelmail/prefs/ should be writable by user apache Please contact your system [...]<p><a href="http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/">Plesk: Error opening /var/lib/squirrelmail/prefs/default_pref</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>On brand new Plesk 8.2.x installations or on servers that have been upgraded to Plesk 8.2.x, you might run into this error when you attempt to log into squirrelmail after it was installed via RPM:</p>
<blockquote><p><code>Error opening /var/lib/squirrelmail/prefs/default_pref<br />
Could not create initial preference file!<br />
/var/lib/squirrelmail/prefs/ should be writable by user apache<br />
Please contact your system administrator and report this error.</code></p></blockquote>
<p>No matter what you do to the /var/lib/squirrelmail/prefs/default_pref file, even if you chmod 777 the file, you will still get the error.  If you check the /etc/php.ini, you will normally find <code>safe_mode</code> set to <strong>on</strong>.</p>
<p><code>;<br />
; Safe Mode<br />
;<br />
safe_mode = Off</code></p>
<p>Simply change <code>safe_mode</code> to <strong>off</strong> and reload Apache.  If you try to log into squirrelmail again, it should complete successfully.  I've tested this on Red Hat Enterprise Linux 4:</p>
<p><code># rpm -q squirrelmail<br />
squirrelmail-1.4.8-4.0.1.el4</code></p>
<p><a href="http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/">Plesk: Error opening /var/lib/squirrelmail/prefs/default_pref</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/10/08/plesk-error-opening-varlibsquirrelmailprefsdefault_pref/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slow Horde login process with Plesk</title>
		<link>http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/</link>
		<comments>http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 18:35:33 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/</guid>
		<description><![CDATA[I've seen quite a few situations where the Horde login process can take upwards of 45 minutes to log a user into the webmail interface. There's a few issues that can cause these extended delays, and most of them can be fixed rather easily: Too many filters / Giant whitelists and blacklists This is the [...]<p><a href="http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/">Slow Horde login process with Plesk</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I've seen quite a few situations where the Horde login process can take upwards of 45 minutes to log a user into the webmail interface.  There's a few issues that can cause these extended delays, and most of them can be fixed rather easily:</p>
<p><b>Too many filters / Giant whitelists and blacklists</b><br />
This is the biggest cause that I've seen.  Some users will create gigantic white and black lists (upwards of 5,000 is my record that I've seen) and this makes Horde compare each and every message in the inbox against these lists upon login.  This also applies to filters as Plesk does not use sieve/procmail for mail delivery.  Horde is forced to do all of the filtering upon login (in some versions) and this can cause extreme delays.</p>
<p><b>Mailbox is gigantic</b><br />
I've seen Horde logins take quite a while in mailboxes that are over 500MB in size.  If the size of your e-mails is large, and you have a large mailbox with fewer e-mails, Horde can normally work quickly.  But, if your inbox is full of tiny e-mails, Horde takes a long time to fully index your mail and display the list (even though it only displays 25-30 at a time).</p>
<p><b>Too many users logged into Horde simultaneously</b><br />
In my opinion, Horde's CPU and memory requirements are too large for a webmail application.  I've seen 30-40 simultaneous Horde sessions bring a dual-core box with 2-4GB of RAM and SCSI disks to its knees.  Consider installing squirrelmail or roundcube webmail for some of your users and urge them to use it instead.</p>
<p><b>IOwait caused by something else</b><br />
Sometimes the server can simply be bogged down with other requests from other daemons, and this slows Horde down.  Make sure that your MySQL installation is tuned properly, and that users are not abusing scripts running through Apache.</p>
<p><a href="http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/">Slow Horde login process with Plesk</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/10/05/slow-horde-login-process-with-plesk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parsing HTML through PHP in Plesk</title>
		<link>http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/</link>
		<comments>http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 18:17:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/</guid>
		<description><![CDATA[Some users will want to parse HTML through the PHP parser because one of their applications requires it, or because they think it's a good idea. Parsing regular static content through PHP is not recommended as it will cause a performance hit on the server each time a static page is loaded. Unfortunately, enabling this [...]<p><a href="http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/">Parsing HTML through PHP in Plesk</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Some users will want to parse HTML through the PHP parser because one of their applications requires it, or because they think it's a good idea.  Parsing regular static content through PHP is not recommended as it will cause a performance hit on the server each time a static page is loaded.</p>
<p>Unfortunately, enabling this in conjunction with Plesk will cause problems with the Plesk web statistics.  Since the PHP parsing is disabled for the <code>/plesk-stat/</code> directories, Apache will mark the page as a PHP page and your browser will attempt to download it rather than display it.</p>
<p>To fix this issue, simply add the following LocationMatch to the bottom of your Apache configuration:</p>
<p><code>AddType application/x-httpd-php .php .html</p>
<p>&lt;LocationMatch "/plesk-stat/(.*)"&gt;<br />
AddType text/html .html<br />
&lt;/LocationMatch&gt;</code></p>
<p>This will force Apache to serve HTML files from <code>/plesk-stat/</code> as text/html rather than application/x-http-php.  Your web statistics will display in the browser rather than downloading as a PHP file.</p>
<p><a href="http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/">Parsing HTML through PHP in Plesk</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/09/28/parsing-html-through-php-in-plesk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session problems with Horde in Plesk with AOL</title>
		<link>http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-with-aol/</link>
		<comments>http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-with-aol/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 02:06:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[mail]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-horde-with-aol/</guid>
		<description><![CDATA[Since AOL sends their users' traffic through proxy servers, this can cause problems with Horde's session handling in Plesk. The problem arises when the user's IP changes during the middle of the session. You may see an error message in Horde that looks like this: Your Internet Address has changed since the beginning of your [...]<p><a href="http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-with-aol/">Session problems with Horde in Plesk with AOL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Since AOL sends their users' traffic through proxy servers, this can cause problems with Horde's session handling in Plesk.  The problem arises when the user's IP changes during the middle of the session.</p>
<p>You may see an error message in Horde that looks like this:</p>
<blockquote><p>Your Internet Address has changed since the beginning of your Mail session. To protect your security, you must login again.</p></blockquote>
<p>You'll normally have this variable in /etc/psa-horde/horde/conf.php:</p>
<p><code># $conf['auth']['checkip'] = true;</code></p>
<p>You can disable this ip check functionality which breaks sessions for AOL users by setting it to false:</p>
<p><code># $conf['auth']['checkip'] = false;</code></p>
<p><a href="http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-with-aol/">Session problems with Horde in Plesk with AOL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/09/27/session-problems-with-horde-in-plesk-with-aol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check the modulus of an SSL certificate and key with openssl</title>
		<link>http://rackerhacker.com/2007/09/14/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/</link>
		<comments>http://rackerhacker.com/2007/09/14/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 17:13:51 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/09/16/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/</guid>
		<description><![CDATA[When you create a CSR and private key to obtain an SSL certificate, the private key has some internal data called a modulus. This is integral to the security of your SSL encryption, but for this specific post, we will focus on one specific aspect. If your private key and certificate do not contain the [...]<p><a href="http://rackerhacker.com/2007/09/14/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/">Check the modulus of an SSL certificate and key with openssl</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>When you create a CSR and private key to obtain an SSL certificate, the private key has some internal data called a modulus.  This is integral to the security of your SSL encryption, but for this specific post, we will focus on one specific aspect.</p>
<p>If your private key and certificate do not contain the same modulus, then Apache will sometimes refuse to start or it may not respond properly to SSL requests.  You can check the modulus of your private key and SSL certificate with these commands:</p>
<p><code># openssl rsa -noout -modulus -in server.key | openssl md5<br />
# openssl x509 -noout -modulus -in server.crt | openssl md5</code></p>
<p>If the MD5 checksums match, then the certificate and key will work together.  However, if they are different, then you cannot use them together.  Generally, this means that you used the wrong CSR (that corresponded to some other private key) when you obtained/created your SSL certificate.</p>
<p><a href="http://rackerhacker.com/2007/09/14/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/">Check the modulus of an SSL certificate and key with openssl</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/09/14/check-the-modulus-of-an-ssl-certificate-and-key-with-openssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hunting down annoying web spiders</title>
		<link>http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/</link>
		<comments>http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 22:16:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/</guid>
		<description><![CDATA[We all enjoy having the GoogleBot and other search engine robots index our sites as it brings us higher on search engines, but it's annoying when some user scrapes your site for their own benefit. This is especially bad on forum sites as they're always a target, and it can severely impact server performance. To [...]<p><a href="http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/">Hunting down annoying web spiders</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>We all enjoy having the GoogleBot and other search engine robots index our sites as it brings us higher on search engines, but it's annoying when some user scrapes your site for their own benefit.  This is especially bad on forum sites as they're always a target, and it can severely impact server performance.</p>
<p>To hunt down these connections when the spidering is happening, simply run this command:</p>
<p><code>netstat -plan | grep :80 | awk '{print $5}' | sed 's/:.*$//' | sort | uniq -c | sort -rn</code></p>
<p>The IP's that are making the most connections will appear at the top of the list, and from there, you can find out which unwelcome spider is scraping your site.</p>
<p><a href="http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/">Hunting down annoying web spiders</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/09/08/hunting-down-annoying-web-spiders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

