jon gales

How To Host Slashdot On a Shared Server

By: Jon Gales

This week’s PowerUser Monday is brought to you by Scott Kelby’s Macintosh

The Naked Truth. Read MacMerc’s review of it here.

If you have a story suggestion, please email it to jon@macmerc.com.

Last week I covered the WWDC Keynote speech live (from the satellite feed

shown at the Tampa

Apple Store). If you missed it and live in a cave, here’s

the archive.

Like all of our live events it was a complete blast–we had tons of people

chatting

in

AIM/iChat

and served

an

amazing

amount

of pages

to enough people to sell out a basketball arena. The most amazing part

of all is that MacMerc is completely housed on a single shared server from

the fine folks at ActaDivina.

spike How To Host Slashdot On a Shared ServerI

could go on and on, but pictures are better than words. Seen at right what Webalizer made

of our traffic spike. The bright blue bar is pages (the main focus of this

article). That spike is pretty impressive… It’s roughly 20 times above our

average. So, what’s the secret to being able to handle the load? Static pages

baby.

Most of the cool features on MacMerc are made possible because of the

cool technology behind it. On any given news article you can comment, moderate

other

comments,

and

sometimes even vote in a poll. On stories like this one you see "blocks"

on the right hand side that give you access to some cool stuff. If you’re a

member (it’s free), you can even see how many people are currently at the site.

On any given page

load, we have server-side code that talks to our database and fetches the

data, formats it, and then exports it off to your browser. It’s all pretty

neat, but

it takes a lot of power to run. I made the decision a long time ago (right

after our server crashed during the iTunes Music Store announcement I believe)

that we would never try live coverage again without going static.

I wrote a

special content management system just for the keynote coverage. It

has a

pretty

slick

interface

and makes a static page as output. It’s also a time saver because it writes

all the time stamps and mark up for me. I just plug and chug. This was the

only scripting going on for the whole site, and only I was using it.

What’s the difference

between static and dynamic? When you accessed us during the keynote

the database

was

completely

still… No server

side programming

happened. Your browser said, "Give me the index page" and our server

said,

"here it is".

To take it a step further, I used mod_rewrite to forward everyone but myself

to the static index page. So if you typed in:

http://www.macmerc.com/ilovedellsomuch

You would see the same exact thing as everyone else. This is so we can assure

that the server is JUST working on shoving out the index page. The only person

that wasn’t seeing this page was me because I was doing the play-by-play.

So how did we do? Well here are some numbers/facts:

  • At our peak we were serving 150,000 pages an hour
  • That peak works out to about 40 pages a second (you should see this fly

    by on the terminal… really something).

  • With almost 500,000 pages served, we only went through about 5 gigs of

    bandwidth (the page was REALLY optimized). Not having any images really helped

    things move smoothly.

  • We still almost got nuked. The highest load average (via top in the terminal)

    I’ve ever seen happened during our peak… Over 100.

  • For a few hours we made Slashdot look

    like a Geocities page. Felt quite good. I felt tempted to try and crash someone’s

    site… Start a tradition of being "Merc’d".

If you’re looking for a host that can handle peaks, check out ActaDivina (nope,

we don’t get anything if you sign up… we just like them). They were superb.

They noticed the peak and streamlined Apache to make things

a little more smooth. Didn’t even have to ask them. If you got any questions

(or suggestions, we are going to be doing this again the

next

time

there is

a similar

event)

please let

me know. If you’re going to be having a similar event and want to find

out more about the content management system that I wrote, feel free to ask.

Metadata In The Finder

By: Jon Gales

To submit a trick/topic for PowerUser Monday just email it to Jon Gales. Jon
welcomes feedback, don’t be shy.

Power users are all about making things quicker. Here’s how to display useful
metadata right in the finder:

  1. While on the Desktop, press Command-j to bring up “View Options”. Once
    in the dialog check the Show Item Info box. Don’t close the box yet
  2. Open a new Finder window and click on the info window that you opened in
    the last step. It should update with a few more options. Check both the Show
    Item Info box and the “All Windows” radio button. It should look something
    like this.
  3. Now you’ll notice that when you’re browsing around in icon view, you’ll
    see handy nuggets of metadata. For instance, dimensions of photos, times
    of movies and songs, number of items in folders, and remaining disk space
    for drives. Here’s a screen shot:

    window Metadata In The Finder

    Nifty eh? As an added trick you can check the right radio button under the
    “Label Position” header and you’ll see the information show up on the side.
    Some people like it icon smile Metadata In The Finder .

Speed up your computing with easy metadata!. Check back
next Monday!

iPod nano vs. washing machine

By Jon GalesJust about three weeks ago I posted a review of my new favorite gadget, the iPod nano. In that review I called the device, “The coolest thing I own bar none” and that wasn’t an exaggeration or another way of saying that I don’t own cool things. Well I’m sad to report that my nano had accidently had a run-in with the washing machine on Saturday morning. Read on for details and photos.

The nano is light enough that it turns out you can’t really tell when it’s in a shirt pocket and when it’s not. On this Saturday morning it was, and unfortunately the shirt was in the washer. I got ahold of it after about a minute in the dryer, so the little white contraption had already experienced a warm wash, cool rinse and exciting spin cycle. It was non-responsive and if I was an ER doctor the nano would have been pronounced dead.
Surprisingly (I guess this is where the spin cycle helps) the unit itself wasn’t too wet. I dried it off and after a while plugged it in. It didn’t mount–my hope that only the screen had been nuked wasn’t panning out. But after several minutes I saw the battery icon on the screen and that lifted my spirits. After another wait, probably about 30-40 minutes, the backlight kicked on and the nano mounted in iTunes and on my desktop. The screen definitely has some problems (see photos), but I’m hopeful that with continued drying it will improve. Errant clicks that came from moisture under the clickwheel have stopped.

Interestingly enough, when photos are on the screen you can hardly see any defects. Well, at least when looking head on. At an angle, there is a dark splotch similar to what is shown in one of the photos below.

After waiting another day, the nano dried completely and at this time you can’t even tell it ever got wet (and soaped up, spun etc). The screen now looks perfect. Very impressive!

If you have another crazy nano survival story, make sure to comment.

DSC00244 iPod nano vs. washing machine

DSC00245 iPod nano vs. washing machine

DSC00248 iPod nano vs. washing machine
Note: