I have a new design rule: Three pieces of embedded media, at most.
This, at least, holds true for large sites on smaller servers. The reason being that MG managed to get Dugg yet again but this time (unlike the last) it took the server down again. In spite of all my previous tweaking. Why?
A big part of the Slashdot Effect (first come, first named) is the number of hits to your server. MySQL and Drupal caching get you absolutely nowhere if you’re loading 20 pieces of media per page when the traffic comes. At peak, this time, we had 10 hits per second to the server. Most of those were media. I’d added some little graphic badges to the bottom of the page and every post had four service icons (for, ironically, posting stories to Digg…) and other little things. Those caused most of the damage. The server was pushing the HTML out instantly, as it was tweaked to, but the images were a whole other story because they were not in memory, but on-disk. So, there are three solutions I’m going to look into for this:
- I’ve removed the footer graphics and moved them to the colophon. Service links are now textual.
- I’ve heard of memory caches for Apache. I’m going to look into this.
- I’ve heard of using smaller servers like lighttpd as graphics servers and doing pass-through to Apache for the big stuff, or using another port or IP or whatnot for graphics. Sounds like it would use even more memory, but it might scale a little better.
After I removed the little graphics, the site responded a bit better and I didn’t have to resort to a static page like the first time. I just need to work out this media bit to make life a little easier. I’m all for a site with just the content, the CSS, and a logo, but sometimes an icon or five are really nice to have…
