<?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>Developer Oracles &#187; digg effect</title>
	<atom:link href="http://devoracles.com/tag/digg-effect/feed" rel="self" type="application/rss+xml" />
	<link>http://devoracles.com</link>
	<description></description>
	<lastBuildDate>Sun, 21 Mar 2010 11:05:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to survive the Digg effect</title>
		<link>http://devoracles.com/how-to-survive-the-digg-effect/379</link>
		<comments>http://devoracles.com/how-to-survive-the-digg-effect/379#comments</comments>
		<pubDate>Sat, 11 Oct 2008 13:37:37 +0000</pubDate>
		<dc:creator>Gary Illyes</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[del.icio.us]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[digg effect]]></category>
		<category><![CDATA[stumbleuppon]]></category>

		<guid isPermaLink="false">http://devoracles.com/?p=379</guid>
		<description><![CDATA[


 Everybody who uses the internet heard about Digg, the infamous social bookmarking service.
It&#8217;s one of the biggest in the industry, with some incredible traffic.
Basically, when a user likes a page, an image or a website, it can submit it to Digg to share the experience with others. If others liked it, they can &#8216;digg&#8217; [...]]]></description>
			<content:encoded><![CDATA[<div style='float:left; padding:3px 6px 3px 3px; '><a href="http://digg.com/"><br />
<img src="http://digg.com/img/badges/32x32-digg-guy.gif" width="32" height="32" alt="Digg!" /><br />
</a></div>
<p> Everybody who uses the internet heard about Digg, the infamous social bookmarking service.<br />
It&#8217;s one of the biggest in the industry, with some incredible traffic.</p>
<p>Basically, when a user likes a page, an image or a website, it can submit it to Digg to share the experience with others. If others liked it, they can &#8216;digg&#8217; it too. The more users &#8216;digg&#8217; a submission, the better, and after a certain number of so called &#8216;diggs&#8217;, the submission arrives in the &#8216;popular&#8217; category.</p>
<p>If a submission arrives in the popular category, the webmaster who&#8217;s page or website has been submitted will be extremely happy because in no time hundreds of visitors will come and see his page.<br />
Then the happiness will be transformed in headaches: the webserver which hosts the submitted page will be either overloaded in no time and denies the service or in a shared environment will use too much resource and the hosting company will suspend the webmaster&#8217;s hosting account for overusage.</p>
<p>The above is called the &#8220;<strong>Digg Effect</strong>&#8220;. In a matter of minutes, the traffic of a website is increased from a few hits per minute to hundreds of hits per minute.</p>
<p>The most affected systems are the poorly written PHP scripts, blogs especially the self-hosted Wordpress engines and in general any software which relies on a database.</p>
<p>So, let&#8217;s see what are the existent practices to deflect a Digg effect from your blog. Also, I asume you are using <a href="http://wordpress.org">Wordpress</a> as blog engine as this is the most used and in the same time the most vulnerable to the digg effect.</p>
<p>If you are on a shared environment, read, you signed up for a hosting plan, a digg effect can attract with itself the suspension of your account because the blog will simply use too much computing resource like memory and processing time, or even bandwidth. A quite recent case is <a href="http://www.quicktweaks.com/2008/09/30/a-day-with-digg-effect/">ashokgelal&#8217;s quicktweaks.com</a> blog or Andrew Wise from wisestartupblog.com. After one of ashokgelal&#8217;s posts got 84 diggs, Lunarpages suspended his hosting account due to excessive resource usage. The same applies to Andrew, after a given time Bluehost suspended his account, too. Worthless to say that their blogs are powered by Wordpress, just like this one.</p>
<p>So how to optimize a Worpress blog to increase its performance during a digg effect.</p>
<p>Enable caching both in the software and on the server. Both ways are extremely easy. To enable caching in wordpress you have to download a plugin and enable it. The plugin is named <a href="http://wordpress.org/extend/plugins/wp-cache/">WP-Cache</a> and saved many webmasters already, it will save you from the digg effect, too. I use this since I never had an issue with it. Another plugin is also available, it&#8217;s named <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP-Super-Cache</a>, but since I never tried it, I can&#8217;t recommend it.<br />
To enable caching on the webserver (Apache), you have to place a .htaccess in the root of your wordpress installation. The .htaccess file has to contain at least the following:<br />
<code><br />
&lt;IfModule mod_gzip.c&gt;<br />
mod_gzip_on       Yes<br />
mod_gzip_dechunk  Yes<br />
mod_gzip_item_include file      \.(html?|txt|css|js|php)$<br />
mod_gzip_item_include handler   ^cgi-script$<br />
mod_gzip_item_include mime      ^text/.*<br />
mod_gzip_item_include mime      ^application/x-javascript.*<br />
mod_gzip_item_exclude mime      ^image/.*<br />
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*<br />
&lt;/IfModule&gt;<br />
</code><br />
Placing the above in your .htaccess will enable the gzip compression for the file types specified in the variable named &#8220;file&#8221;. The pages will be served compressed, thus much faster, which means less impact on the server.</p>
<p>Make sure your server supports the &#8220;If-Modified-Since&#8221; request headers. This will allow the web browsers to recognize if the content was modified since last time of visit. While this has no effect on new visitors, it&#8217;s extremely useful if the visitors return as the content will be served from the cache.</p>
<p>Uninstall/deactivate every Wordpress plugin which is only for beautifying the pages. Believe me, max 4-5 plugins activated is more than enough. More plugins usually means that the server has much more work on each page view.<br />
Also, if you love widgets, try to hate them and use a default, static and widget-less sidebar. Widgets are not that interesting for anybody, they are usually a useless piece of code-block and only makes your website slow. Under a digg effect widgets will put extra load on the server.</p>
<p>To optimize a website which you developed is more complicated. First of all, you have to make sure that you are using the less MySQL queries possible. If you can manage to have less than 3 queries per page, you&#8217;re good. Also, if it&#8217;s not a must, don&#8217;t output text with PHP. Better brake out of PHP and use standard HTML.<br />
Enabling gzip compression is also a good idea. It will save you loads of headaches.</p>
<div style="float:left; clear: right;">
<script type="text/javascript">
digg_bgcolor = '#000000';
digg_window = 'new';
</script><br />
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>Another great tactic is to provide a mirror of your content. For example if you feel that you get way too much visitors, setup a new subdomain and copy your content to the new subdomain. Then on Digg let the users know that you have alternate URL for the particular post. This way you will manage to create a natural load balancing.</p>
<p>The idea is to always be prepared to a digg effect. So, if you observe a very high number of users are coming, let your hosting provider know about it. They will manage to throttle your bandwidth or limit the number of connections so your account will not get suspended.</p>
<p>I think these are the actions you can take. If I missed something, let me know.<br />
Also, if you already survived a digg effect, let us know about your experiences. Your knowledge might help others. </p>
]]></content:encoded>
			<wfw:commentRss>http://devoracles.com/how-to-survive-the-digg-effect/379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
