Friday, March 26, 2010

Digg Defender: A Plugin For Wordpress -- Elliott C. Back

An article I wrote about well-designed blogs got more than 1,200 diggs yesterday, causing an influx of some 20,000 to 30,000 new visitors, each pulling down the following page elements: 10 large images totalling 969,582 bytes CSS and JS totalling 21,655 bytes HTML totalling 45,492 bytes With over a dozen files per request, and 1 MB of transfer, it's [...]

Many bloggers have experimented with autoposting, Wp Robot is one of the best autoblogging solutions available....easy to use and keeps your blogs fresh!

Wordpress Info found on elliottback.com

An article I wrote about well-designed blogs got more than 1,200 diggs yesterday, causing an influx of some 20,000 to 30,000 new visitors, each pulling down the following page elements:

With over a dozen files per request, and 1 MB of transfer, it's clear that a Digg or Slashdot will overload my poor server. However, there exists a global cache system called Coral Cache which can be used in times of stress to distribute abnormal, spiky load. This will save your onsite HTML and Wordpress system from being hit every time a visitors comes through one of those high traffic sites. Since these visitors will be setting their referrer field, we can identify them, create a special cache redirect URL for them, send them there, and exit. No messy rendering needed.

Clearly this won't work for a general solution. Instead, we'll take advantage of Wordpress' new cache hook, which is the symlink advanced-cache.php in the wp-content folder. There's one problem-there could already be something there. So, we'll have to follow the following flow:

Then we just redirect to a Coral Cache version of our page. This way, when your Wordpress blog gets hit by a DDOS from the popular linksites, it can respond quickly and fluidly without having to load all of your plugins, Wordpress, or even make a single mySQL database call. This will optimize the performance significantly. There's going to be a problem if something else-say WP-Cache is installed after us, and steals our symlink, but I'll just have Digg Defender repeat the initialization steps on every activation.

The second part will be a post_content filter that rewrites all external references in the post, such as js or images, to use Coral Cache links-but only for the Coral Cache robots. This way, Coral Cache will cache a copy of the html of a page which has been injected with Coral Cache links everywhere else. Not a single Digg user request will ever touch your website, because Coral Cache will act as a continuous buffer.

Extract the folder digg-defender, copy it to your wordpress/wp-content/plugins/ folder, and activate the plugin in your admin interface. It will spit out numerous textual warnings and errors if permissions are incorrectly set. Note that if WP-Cache is also installed, only raw pages will be buffered, and not their contents, because WP-Cache will have already cached the page.

Read More About Wordpress...

No comments:

Post a Comment