Scaling WordPress

Blogging, Web Development 14 Comments »

WordPress vs. DiggWordPress seems to have a bad reputation when it comes to scalability. Maybe it’s deserved, since a default WordPress installation doesn’t really scale well. But making WordPress scale isn’t hard. I recently hit the Digg home page and got roughly 70,000 pageviews in under 12 hours. Another post hit the home page later the same day, and another 10,000 clickthroughs followed. As a result, I’ve been asked by a few people how I managed to keep my site up under that sort of stress. Honestly, I haven’t done anything that fancy. But for future reference I figured I’d document my configuration, and let people in on one trick that saved my butt. Read the rest of this entry »

Site Redesign

Blogging, Random 5 Comments »

I’ve had “redesign blog” on my to-do list for more than a month now. Over the weekend I finally got around to doing something about it [screenshot]. The stock WordPress theme I’ve been using since I launched my blog is great, but I’ve noticed it showing up on more and more sites and I wanted something unique. The changes I made are evolutionary, not revolutionary. And I’m the first to admit that I’m not the best designer around, but I think it’ll do for now. Read the rest of this entry »

How to turn your feed into a Google Gadget

Blogging, Google 9 Comments »

Gadget FeedAfter explaining this process several times, and looking over the search terms that have led people to my article on making Google Gadgets, I’ve decided to answer this question once and for all. Turning a supported feed (Atom 0.3 or 1.0, or RSS 0.91, 0.92, 1.0, or 2.0) into a simple Google Gadget is trivially easy, and can be done in a few simple steps. Read the rest of this entry »

WordPress Plugin: WP-Offline

Blogging, Google 59 Comments »

WP-OfflineAs many of you are already aware, Google announced a new product last week called Google Gears (I wrote an intro to the toolkit a few days ago). After playing around with Gears for a while I realized that I could use it to solve a problem that has bothered me for some time: I can’t read blogs offline! WP-Offline is a WordPress plugin that lets your readers cache your entire blog for offline reading using Google Gears. Read the rest of this entry »

How Readable is Your Blog?

Blogging, Software 11 Comments »

Readability Tester
I’ve been reading a lot of blogs lately and was wondering what the average blog’s readability was compared to say, the New York Times, or even the USA Today. I figured I could write a little spider to crawl a blog and calculate these statistics, but I never got around to it. Then yesterday I came across an interesting post discussing the ideal length of a blog post, and was inspired. So now, I present to you my Blog Readability Tester (I figured the name Charlotte was appropriate since she’s a spider that likes words). Read the rest of this entry »

The showdown: apache vs. lighttpd

Blogging, Web Development 3 Comments »

Is lighttpd faster than Apache? Can Wordpress handle high traffic websites? Rumors spread like wildfire on the web, and sometimes it’s hard to separate the truth from evangelism and clever marketing. Today I’m going to put Wordpress to the test, running under Apache and lighttpd, and see if a clear winner emerges. Read the rest of this entry »

Making popularity contest play nice with WP-Cache

Blogging, Programming 28 Comments »

In this post I’m going to describe how I got Alex King’s popularity contest Wordpress plugin to work with WP-Cache2. If you’re not interested in how it works, you can skip reading the article and just download my modified version of popularity-contest.php [pretty-printed version] that you can put in your plugins/popularity-contest directory replacing the original file. Make sure you delete your old cache files after installing it to get things working right away.

Update: Make sure you check that your feeds still work after the plugin is enabled. The PHP engine may try to interpret the XML declaration at the top of the file, causing a scripting error. If this happens you can tell WP-Cache not to cache your feed by adding /feed (or something else that matches your feed’s URL) to the list do not cache list under the WP-Cache options. If you really need your feeds cached, you could add some logic to popularity-contest.php to fix the problem.

Read the rest of this entry »

Monitor stories from your website appearing on digg.com

Blogging, Google 1 Comment »


I’ve been looking for a way to easily monitor stories from my website that appear on digg.com so that I can prepare if a story looks like it might reach the front page. My first solution was to simply subscribe to the RSS search results feed for my domain. Doing this is pretty simple: search for your domain using digg’s search utility, specifying “URL only” as the search criteria. Then subscribe to the RSS feed on the results page.

I’ve added the resulting RSS feed to my Google homepage, which allows me to keep tabs on upcoming stories from my site. But there are two problems with this method: it doesn’t tell you how many diggs stories have, and Google caches the feed results so you’re looking at old data.

After my recent foray into google gadgets I realized that a simple google gadget could solve both problems, so I wrote one. It’s based on the official Digg gadget with one additional option — monitoring stories for a specific website. If you want to try it out, you can click here to add it to your google homepage.

Digg Widget 2.0

Blogging, Programming 2 Comments »

DiggFriends 0.02
A couple of weeks ago I wrote a post on the Vino2Vino development blog about a digg widget that displayed your friends’ digg activity on your blog. I wrote the widget in response to a request by another digg user. If you didn’t read the original post, the widget displays a list of articles recently dugg by your friends. As I said in the original post, the code was a simple proof of concept, but it drew a lot of attention and a lot of criticism.

The complaints were all pretty accurate (no built-in caching, scraping data instead of using RSS, poor styling, etc.), and I promised to address them in a future release of the widget. So here it is — DiggFriends 0.02 Beta. You can see a working example of the new version in the sidebar here on my blog.

Read the rest of this entry »

Measuring the Digg Effect

Blogging No Comments »

So I got dugg earlier today, neat. I woke up at around 9am (EST) and saw that my post on how not to optimize a MySQL query had just made the front page of Digg. Cool. I ran tail -f on my apache logs and saw lots of traffic. Even cooler. I ran top and saw the load average was around 50 (that’s a five followed by a zero, on a single processor box). Not so cool. I immediately got up and took a shower, cuz I can’t do jack without a shower. After showering I installed WP Cache.

As you can see from the MRTG graphs below it made a bit of difference (note that the load is multiplied by 100 in the graph). Before WP Cache the load average was bouncing around in the 30 to 70 range. The site was responding, but very s - l - o - w - l - y. It hadn’t been ‘dugg’, but it was close. Tip: having a dedicated server (or two in this case) helps here. After WP Cache the web server load dropped to about 0.02. Latency dropped to near zero. Beautiful.

You can see the difference it made in the network utilization data. The green is incoming traffic, blue is outgoing. The green spike is the incoming SQL result sets coming from the database server. After WP Cache was installed it (predictably) dropped to pre-digg levels. Curiously, the database server never flinched. Apparently WP is not that database intensive.

I’ve also posted a number of graphs from Google Analytics, in case anyone was curious. I like these numbers. 73% Firefox vs. 14% IE. 15% Mac, 10% Linux. Sweet. There have been a total of 17,175 visits so far, the peak was 5,421 visitors from 9am to 10am. Note that some of the times may need adjustment since Google Analytics is PST and the server is Central.

If you’re interested in some statistic that I forgot to mention, you can download a copy of the log file (gzip format) (bzip2 version) for analysis. It’s 2.1MB using bzip2, 4MB gzipped, 125MB unzipped. If you find anything interesting post a comment and let me know. If you can’t figure out how to calculate whatever you’re looking for post a comment anyways and I’ll see if I can help you (or maybe someone else can).

Load Average

April 10 - Digg Effect Load Average

CPU Usage

April 10 - Digg Effect CPU Usage

Network Utilization

April 10 - Digg Effect Network Utilization

Traffic Stats

April 10 - Digg Effect Google Analytics

Browser Version

April 10 - Digg Effect Browser Version

Platform

April 10 - Digg Effect Platform

Copyright © 2007 - Mike Malone / Icons by N.Design Studio
Entries RSS Comments RSS Log in
no image