Code / Appnel Solutions 

Posted
29 November 2007 @ 11am

On MT's resiliency when "getting Dugg"

sarahintampa wants to move off of TypePad and is trying to decided if MT4 is right for her. In posting her thoughts she writes:

I read somewhere that if you get Dugg, your MT site stays up and your WP site goes down…something to do with the database…? Anyone who can explain this, please comment!

This comes up frequently enough that I thought I would post it here for the benefit of others and my own future reference. What follows is a lightly edited version of the comment I made.


This is mostly true though given enough traffic or lack of server resources any site, regardless of the tool, will go down. A more accurate statement is that MT is more resilient to “getting Dugg” then WordPress and other dynamic publishing tools.

WP, and other tools like ExpressionEngine, uses a dynamic publishing model. This means with each request by a user via the browser, a page is compiled and rendered before being returned. The process means that one (and often more) database requests need to be issued to get your content so it can be merged with the markup in the template to produce the page that is sent back to the browser. The benefit is instant gratification for the author.

MT uses a static publishing model. The process of issuing database requests and merging them with the markup in a template is similar; however, MT will write a physical file to your server. These static publishing (formerly referred to as rebuilding in MT parlance) events are triggered in a number of explicit and implicit ways.

With a static file, when a user requests a page your web server simple reads the file and sends it down the pipe to the browser. The key benefit here is that each request does not need to make any database requests and there is very little computation needed. This makes MT powered sites more resilient to sudden spike in activity such as getting Dugg because serving static files use significantly less server resources.

Another benefit is that your database can go down, but your site will still be viewable. Only accepting comments and publishing new content would be affected. IMHO that’s better then your site just disappearing.

There are a few trade-offs to the static model that are worth mentioning. Given enough content or unoptimized templates you can experience very long publish times. You also have to be mindful of frequently updated sidebar or footer content in archive pages. MT’s default templates design around this issue. If you really want to include something of this nature there are work arounds using server or JavaScript includes. The issue here is that it’s not as intuitive for the developer/publisher designing the site.

I know that there are a few caching options for WP (wp-cache comes to mind) that will help it perform better making it more resilient. I haven’t worked with them personally so take that for what it’s worth. I’ve read mixed reviews and still a fair number of WP feeds going down when Dugg. Perhaps that is just a lack of user awareness. I don’t know.


2 Comments

Posted by
Chad Everett
29 November 2007 @ 12pm
Permalink

There are actually several WP caching plugins, which are more accurately described as static-publishing plugins (they effectively publish the pages to disk), and they apparently work fairly well, from what I understand. "WP Super Cache", I think, is the latest iteration, which is supposed to be the best of the bunch.

It's also probably worth mentioning that MT has a dynamic publishing model that makes it just as likely to break as WP - in fact, sometimes more, since the MT dynamic model requires such heavy database use with every request (even when caching!).

I've found that judicious use of the dynamic model, while keeping the heavily-accessed pages such as indexes and individual archives as static archives, works well. Notably, category and monthly archives work well as dynamic archives. For whatever reason, MT4(.01) doesn't seem to support author archives as dynamic, so they have to be static, so keep that in mind.


Posted by
Rob Staveley
30 December 2007 @ 12pm
Permalink

I'm a blogging newbie, finding my way with the available technologies. This site is enlightening; I'm particularly interested in your take on the MT versus WP battle.

I'm instinctively predisposed to the static publishing model, because it doesn't seem right leaving rendering to your reader. However, I've heard a lot of criticism about the length of time it takes to publish large blogs (e.g. several minutes for a few thousand entries on a shared server).

It doesn't seem like the solution to this can possibly be dynamic rendering, because surely that's just leaving the wait for your loyal reader to endure. Is it simply that WP typically lends itself to more efficient rendering and MT is rendering too much, when it is asked to publish?

Why should a large archive of entries make any significant difference to the publishing time? Surely old archives don't get republished....do they??

...be mindful of frequently updated sidebar or footer content in archive pages...

Oh yes, that's a point. I hadn't thought of that. But if you handle that cleverly with JavaScript widgets to include up to date content in the archives, is the publishing process smart enough to know that you do not need to re-render the archive pages? [Sorry for my ignorance here, but I warned you I was a newbie.] And if so, shouldn't the appropriate approach be encouraged by the MT4 framework [for designing templates]?

In the bad old days your typical low cost web host didn't support CGI scripting. Maybe it provided a web counter, if it wanted to be really competitive :-J

In those days, your home/office PC would have its content locally/on the network drive and you'd deal with content management and HTML rendering off-line and FTP HTML files to the server. That gave your PC something to do in between solitaire runs.

In these more enlightened days your PC has a dual core CPU for solitaire and HTML rendering is foisted onto an over-burdened virtual CPU on a shared server. I wonder if some of the burden of publishing couldn't be born by the author's PC? Or would that make it messy?


Leave a Comment

← Before After →