I recall twitter originally being written in something that proved unscalable, so they had to switch. Can't remember what it was though.
Nowadays, we have fancy stuff like Resque for background jobs, Passenger (aka mod_rails) for serving up Rails content, and a plethora of NoSQL databases.