Archive for the 'sysadmin' Category

Facebook in Prineville, a slightly different view

Oooh! Pretty blinkenlights!

On Friday, Facebook’s Senior Open Programs Manager, David Recordon, took a group of us from the OSL on a fantastic behind-the-scenes tour of the new Facebook data center in Prineville, Oregon. It was an amazing experience that prompted me to think about things I haven’t thought about in quite a few years. You see, long before I was ever a server geek I spent my summers and school holidays working as an apprentice in my family’s heating and air conditioning company. As we were walking through the data center looking at the ground-breaking server technology, I found myself thinking about terms and technologies I hadn’t considered much in years – evaporative cooling, plenums, airflow, blowers. The computing technology is fascinating and ground-breaking, but they’ve been covered exhaustively elsewhere. I’d like to spend some time talking about something a bit less sexy but equally important: how Facebook keeps all those servers from melting down from all the heat they generate.
Continue reading ‘Facebook in Prineville, a slightly different view’

Varnish: lookup at the end of vcl_recv

Ah, the beauty of hindsight. Things are so clear.

Last night I was working on optimizing my Varnish config. My cache hit rates have been lower than I wanted, so I was going through some of the examples on the Varnish wiki – especially this one. Here’s what I had in my vcl_recv:
Continue reading ‘Varnish: lookup at the end of vcl_recv’

vcl_hash

I’ve been trying to figure out the effect of this line in my Varnish config:

sub vcl_hash { if (req.http.Cookie) { set req.hash += req.http.Cookie; } }

It seemed to make sense, but I was having a hard time wrapping my head around its ramifications. I was looking at some of the docs on the Varnish site and at this great Varnish config walkthrough when the metaphorical lightbulb went on. By adding the cookie to the hash it’s effectively creating a per-session cache.

Hmm. An interesting tradeoff. On one hand it’s filling up my available cache with duplicate copies of the same content because the hash identifying the cached content is cookie-specific. On the other, it is delivering content from cache that wouldn’t normally be cached because of the cookie.

Pressflow, Varnish and Caching … oh my!

It all started with an itch. It was a really painful itch that involved a Drupal site that was essentially down due to load. I scratched it with the help of a few incredibly helpful blog posts I found, so now it’s my turn to add to them so someone else can benefit as well.

The Problem:

HALP! The site, it is sinking!
HALP! The site, it is sinking!

A large school district wanted to replace their existing outdated static web site with a modern CMS. They chose Drupal as their platform. The new site was successful.

Too successful.

The average traffic of 5 hits/sec jumped to over 100 hits/sec and the server went into a swap death spiral.

Fear not! Help is on the way in to form of a couple of technological superheroes …

Pressflow and Varnish - Technology superheroes
Pressflow and Varnish to the rescue!

The mutually-complimentary combination of these two tools can vastly increase the number of users your site can serve. Here’s the what, why, and how:
Continue reading ‘Pressflow, Varnish and Caching … oh my!’

Dabbling with Yahoo Pipes

Since I run a lot of Drupal and Moodle servers, it’s a good idea to keep up to date on all the published vulnerabilities. I’d really prefer to have some tool that lets me know when a new vulnerability is found, so I don’t have to keep checking back at a bunch of different web sites on the off chance a new vulnerability has been found. Fortunately, the Department of Homeland Security has an excellent site that provides RSS feeds of the vulnerabilities in their database. Handy, but a serious case of information overload since the feeds cover everything in their database.

Hmm. Distinctly suboptimal. Perhaps this is a good time to play with Yahoo Pipes? I’d looked at it before, but had never gotten around to actually building a pipe. This seems like a nice simple thing to try. Continue reading ‘Dabbling with Yahoo Pipes’

HOWTO: Shared-code hosting for Moodle

When I first started working with Moodle servers, one of the things that bugged me was the fact that it required a complete install of the code for every site hosted on the system. While that’s fine for most circumstances, it really did not work well in our environment where we’re looking at potentially hosting hundreds of Moodle instances. So, in the fine open source tradition of scratching an itch by finding something someone else has done, modifying it, and then sharing it with the world … I give you shared-code Moodle, OSL-style.

First, though, credit where credit is due. Martin Langhoff posted almost all of what we needed to do here. All I needed to do is expand upon it to fit our needs.

Second, what the modified code actually does:
1) config.php looks in Moodle dirroot/multisite_config for an ini file matching the server name. I.E.: fqdn.domain.org.ini
2) If found, the ini file is parsed and used to populate the Moodle $CFG

On to the code!

Continue reading ‘HOWTO: Shared-code hosting for Moodle’

Sysadmin quote of the week: RBL hell

A sysadmin friend of mine said this on IRC today (sanitized to protect the innocent):

I had to whitelist our own domain so we could send mail to each other

Ouch.

Bad users. No spamming for you!