<?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>Ryan McKern &#187; apache</title>
	<atom:link href="http://ryanmckern.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanmckern.com</link>
	<description>Linux system administration out of the Boston area; loud music, sharp knives, and a slightly disturbing obsession with food.</description>
	<lastBuildDate>Mon, 19 Jul 2010 21:53:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Apache Admin Notes: Raw Performance Numbers</title>
		<link>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/</link>
		<comments>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 21:55:07 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=336</guid>
		<description><![CDATA[In late December I started looking at alternative web servers, having hit a point where I actually asked aloud (though to no one in particular) why I still use Apache for any http or php needs that may arise. I sat down, installed nginx (nginx 0.6.33) from the EPEL (Extra Packages for Enterprise Linux) repositories [...]]]></description>
			<content:encoded><![CDATA[<p>In late December <a href="http://ryanmckern.com/general/280/">I started looking at alternative web servers</a>, having hit a point where I actually asked aloud (though to no one in particular) why I still use Apache for any http or php needs that may arise.</p>

<p>I sat down, installed <a href="http://nginx.net/">nginx</a> (nginx 0.6.33) from the <a href="https://fedoraproject.org/wiki/EPEL">EPEL (Extra Packages for Enterprise Linux)</a> repositories and <a href="http://www.lighttpd.net/">lighttpd</a> (lighttpd 1.4.20) from the <a href="https://rpmrepo.org/RPMforge">RPMforge</a> repositories (both third party repositories worth writing about in detail at a later date). Apache was already installed (httpd 2.2.3), so a virtualhost was configured to serve data from the same docroot using all three servers, and PHP through fastcgi was configured for lighttpd and nginx<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>.</p>

<p>I then set up a stock WordPress 2.7 blog, some large images, some thumbnails, and created what amount to approximately a 20k index page with nothing cached. Using ApacheBench to fetch 1000 requests, 100 requests at a time, I came up with some simple numbers showing how long it took to return the same page for each web server.</p>

<p>While I openly admit that the benchmarks produced here are arbitrary and superficial, they do give some rough insight (10,000ft overview level insight) as to how much faster nginx and fastcgi are over apache 2.2 and mod_php. lighttpd also performed admirably, and with less hassle involved in set up than nginx, but I suspect that may just be previous familiarity with the configuration.</p>

<p>A table of numbers (soon to be a graph, when I feel like making it) and some thoughts as to what they mean and why we (the web hosting community) still use Apache religiously follows after the jump.</p>

<p><span id="more-336"></span></p>

<table border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr>
            <th width="40%">
                Metric
            </th>
            <th width="20%">
                Apache
            </th>
            <th width="20%">
                ligHTTPD
            </th>
            <th width="20%">
                nginx
            </th>
        </tr>
        <tr>
            <td>
                <h5>Time taken for tests</h5>
                lower is better
            </td>
            <td>
                45.584 seconds
            </td>
            <td>
                24.199 seconds
            </td>
            <td>
                17.395 seconds
            </td>
        </tr>
        <tr>
            <td>
                <h5>Total transferred</h5>    
                compression was enabled
            </td>
            <td>
                21691000 bytes
            </td>
            <td>
                22059912 bytes
            </td>
            <td>
                21894000 bytes
            </td>
        </tr>
        <tr>
            <td>
                <h5>HTML transferred</h5>
                compression was enabled
            </td>
            <td>
                21464000 bytes
            </td>
            <td>
                21833686 bytes
            </td>
            <td>
                21671000 bytes
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Requests per second</h5>    
                higher is better
            </td>
            <td>
                21.94 [#/sec]
            </td>
            <td>
                41.32 [#/sec]
            </td>
            <td>
                57.49 [#/sec]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Time per request</h5>    
                lower is better
            </td>
            <td>
                4558.396 [ms]
            </td>
            <td>
                2419.853 [ms]
            </td>
            <td>
                1739.542 [ms]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Mean Time per request</h5>
                lower is better
            </td>
            <td>
                45.584 [ms]
            </td>
            <td>
                24.199 [ms]
            </td>
            <td>
                17.395 [ms]
            </td>
        </tr>
        <tr>
            <td>
                <h5>Transfer rate</h5>
                higher is better
            </td>
            <td>
                464.69 [Kbytes/sec]
            </td>
            <td>
                890.26 [Kbytes/sec]
            </td>
            <td>
                1229.11 [Kbytes/sec]
            </td>
        </tr>
    </tbody>
</table>

<p>So what does all this mean? Well, the gist of it is that nginx is really, really god damned fast.
Embarrassingly fast. Note that I didn't say that Apache is slow. It's just not nearly as fast as nginx.
However, that being said, nginx is also not nearly as extensible as Apache is. The lack of support for things that are taken for granted nowadays (.htaccess files come to mind) can be a sticking point for use in a shared hosting environment. lighttpd doesn't support most of those "expected" bells and whistles either, and an argument could be made for such things being a waste of cycles…
But the bottom line is that such bells and whistles are <strong><em>expected</em></strong> to work in a shared hosting environment.</p>

<p>As for why the web hosting community at large drops Apache into place whenever we need an http server, I think it boils down to comfort and laziness. It's bundled with most linux distros by default, we know it because it's been around forever, and its behavior is predictable and familiar. It's become the Microsoft Office of http serving, for better or for worse, and it's not going anywhere any time soon. Even the 800lb gorilla behemoth that is Microsoft IIS has failed to dethrone Apache for sheer ubiquity. I think the performance or security conscious are always going to migrate towards something with better speed and less attack vectors, but the typical admin probably just won't care.</p>

<p>And me? For now I'm going to continue using Apache, while I work out if using nginx for any of the sites I host for people would be a problem. If I can get the rewrite rules taken care of, and work out simple site provisioning, I might well make the switch. nginx seems like a no-brainer on single site virtual servers, where resources are scarce, and Apache isn't getting any more svelte these days.</p>

<p>--</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Credit where credit is due. I couldn't have started to work out the nginx fastcgi configuration without help from <a href="http://blog.codefront.net/2007/06/11/nginx-php-and-a-php-fastcgi-daemon-init-script/">this post</a> on <a href="http://blog.codefront.net/">redemption in a blog</a>. <a href="#fnref:1" rev="footnote">↩</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2009/01/apache-admin-notes-raw-performance-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Admin Notes: Knowing The Field</title>
		<link>http://ryanmckern.com/2008/12/apache-admin-notes-knowin-the-field/</link>
		<comments>http://ryanmckern.com/2008/12/apache-admin-notes-knowin-the-field/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 06:02:13 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[informational]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[iplanet]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[shoot-out]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=280</guid>
		<description><![CDATA[For those unaware, I'm an Apache web server administrator. However, for the last few years, a variety of other web servers have been gaining in popularity and building dedicated followings around themselves. 8 years ago when I started Webslum your web server options were basically iPlanet (now Sun Java System Web Server), Apache, and IIS [...]]]></description>
			<content:encoded><![CDATA[<p>For those unaware, I'm an <a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server">Apache</a> web server administrator. However, for the last few years, a variety of other web servers have been gaining in popularity and building dedicated followings around themselves. 8 years ago when I started Webslum your web server options were basically <a href="http://en.wikipedia.org/wiki/IPlanet">iPlanet</a> (now <a href="http://wikis.sun.com/display/WebServer/">Sun Java System Web Server</a>), Apache, and <a href="http://www.iis.net/">IIS</a> (which no one but Windows administrators and suits took seriously then).</p>

<p>However, since then <a href="http://nginx.net/">nginx</a>, <a href="http://www.lighttpd.net/">lighttpd</a>, and <a href="http://litespeedtech.com/products/webserver/overview/">LiteSpeed</a> have all gained various followings due to the things they do better (or don't do at all) over Apache. Apache is sort of a swiss army knife, in that it's infinitely extensible but much like a swiss army knife, it's also not always very good at everything that it does. Ever try to use the swiss army scissors to cut anything more than newsprint? I don't recommend it under the best circumstances. It will end in stitches.</p>

<p>lighttpd in particular has come up as <a href="http://wiki.rubyonrails.org/rails/pages/Lighttpd">popular with the Rails crowd</a>, though that's being phased out in favor of <a href="http://www.modrails.com/">Phusion Passenger</a> (also known as mod_rails, though mod_rack might be more appropriate any day now).</p>

<p>So, this week I plan to sit down and start with <a href="http://en.wikipedia.org/wiki/Comparison_of_web_servers">this comparison on Wikipedia</a>, and then evaluate both my own needs and the needs of my hosted sites to see if Apache is truly the best fit for my needs. Maybe I'll even go so far as to set up a shoot-out with some benchmarks. But probably not. My laziness is notorious.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2008/12/apache-admin-notes-knowin-the-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting control panels</title>
		<link>http://ryanmckern.com/2008/06/hosting-control-panels/</link>
		<comments>http://ryanmckern.com/2008/06/hosting-control-panels/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 20:12:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[site meta]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[control panels]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[direct admin]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openpanel]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[vhcs]]></category>

		<guid isPermaLink="false">http://ryanmckern.com/?p=54</guid>
		<description><![CDATA[Seriously, I am learning to write code just so I can write a hosting control panel that doesn't make me violently angry when I try to use.]]></description>
			<content:encoded><![CDATA[<p>For about 6 years I've pondered the nature of web hosting control panels.
When I ran a web host, I played with <a href="http://www.cpanel.net/index.html">CPanel</a>, <a href="http://www.parallels.com/plesk/">Plesk</a>, and <a href="http://www.directadmin.com/">DirectAdmin</a>. I've since dabbled in the open source waters of <a href="http://www.webmin.com/">Webmin</a> and <a href="http://www.webmin.com/index6.html">Usermin</a>, and of late I've even poked at <a href="http://www.vhcs.net/new/">VHCS</a> and <a href="http://www.openpanel.com/">OpenPanel</a>. I have, to date, not seen a single control panel that is precisely what I want (with DirectAdmin coming closest, and almost being a winner if not for its tiered reseller model aaaaannnd price tag). The real sticking points come down to the fact that I want:</p>

<ul>
<li><p>The control panel to write human-readable, reasonable configuration files: This is where Webmin falls down on the job. The config files are valid, but <em>god</em> are they awful to read.</p></li>
<li><p>No mention or hint of reseller anything: I just want administrative accounts running the show and hosted accounts with domains linked to them. Maybe some way for the hosted to monkey with the non-essentials of their own accounts. So on the grounds of overkill, pretty much every commercial panel fails my simple needs.</p></li>
<li><p>Email support for something that's not <strong>antiquated</strong>: some panels use <a href="http://www.qmail.org/">qmail</a> (or some version therein, which hasn't had a proper update in years), some use <a href="http://www.sendmail.org/">sendmail</a> (which is older than dirt and half as secure), and some use whatever the flavor of the month is (read: whatever ships on the supported OS distro). Me? I'm a <a href="http://www.postfix.org/">postfix</a> guy. I'm not wedded to it per se, but it's updated, feature packed, works well and its configuration is only modestly arcane (qmail, by the way, fails due to having an arcane configuration file structure that doesn't plug into antivirus or spam very easily).</p>

<p>Regarding IMAP and POP support, I find that these panels often use their own "questionable" clients, or rely on <a href="http://www.courier-mta.org/">courier</a>. There isn't really anything wrong with that, I just like <a href="http://www.dovecot.org/">dovecot</a> more (to be fair, DirectAdmin supports dovecot last I checked).</p>

<p>I don't want to even get started with authorized SMTP support from these packages. <strong>God, the horror</strong>.</p></li>
<li><p>No byzantine dependencies: Don't tell me that I need some god awful fossilized encryption library or ldap to make this system work.</p>

<blockquote>
  <p>"Listen here, Mr. Control Panel, I don't use LDAP, and unless that is what 
  you're using as a backing store for your hosting information, neither should you."</p>
</blockquote></li>
</ul>

<p>To that end, I've begun playing with Ruby and <a href="http://yehudakatz.com/2008/05/12/by-thors-hammer/">Thor</a> to whip up some simple add/delete scripts (with initial success!), and the biggest stumbling block I've encountered so far is just parsing out the accounts that exist.</p>

<p>The Apache configuration file format is… archaic in its own right, being neither XML nor attribute: value pairs. It's readable, but there is a reason that an entire perl package (HTTPD::Config, which may or may not exist anymore) was produced just to scrape httpd.conf files.</p>

<p>I fear that without stepping back a little and engineering a proper solution I'm just going to wind up reimplementing what I encountered when I did overnight support for Reality Check Networks (no link provided, because, well, you know. <em>Those dudes…</em>).</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanmckern.com/2008/06/hosting-control-panels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
