Why David Corcoran Destroys Everything He Touches

DMZ · July 29, 2006 at 3:25 pm · Filed Under Mariners 

or, “This is why we can’t have nice things.”

A brief and vastly over-simplified summary of USSM’s technical dilemma.

We have a ton of users. The vast majority of them, as you’d expect, are relatively passive – they come to the site, they read the front page, and they depart. On days where there’s M’s-related news, we see huge spikes, as occasional readers come by to see what we’re saying about it.

But generally speaking, that’s it. If that were the only thing going on, the choice would be simple: you generate a page when it’s written, stash it, and serve it up to everyone who asks. Huge traffic surges, it’s not a big deal: you send that one file out a million times.

WordPress (WP), the software USSM uses, doesn’t do that. To vastly oversimplify, every time you come to USSM, it goes off to the database and grabs all the pieces that make up a page, then hand-assembles them. Every time.

This is good because it means every single page is fresh off the presses, but it also puts a huge load on the database server.

So let’s say we go to a publishing solution that doesn’t do that. Movable Type (MT) is the one I’ve been looking at. If I wrote a post, it would stash a version of that post and then serve it up every time.

The problem is that it has to then rebuild that template every time it changes.

So let’s say you’ve got a Determined, Jonesing Commentor. Here’s what happens each way:

WP: DJC pushes a ton of comments into the system, each one a fairly easy call, but his insane constant reloading means many huge, extremely tough calls.

MT: DJC pushes a ton of comments into the system, each one requiring an extremely tough rebuild of the page, which is then stored. The insane constant reloading, though, is quite light on the system.

Now think of a game thread, which is nearly a worst-case scenario: many readers like this DJC guy, all reloading frequently to see new comments, and a good portion of them adding comments, often in bursts that are extremely close to each other.

The easy solution is to drop comments and go to static pages. The load drops to nothing, everyone’s happy. Except the commentors and everyone who enjoys commenting. And the best comment authors have thousands of pretty good ones (the top 30 comment authors have written a fourth of all comments).

I’m also going to investigate some intermediate solutions, like partial caching of pages, only showing the last n comments by default, and so forth.

The hard solution is hard, and we don’t have it yet.


Comments are closed.