Random($foo): Internet Asshattery, Armchair Scaling Experts Edition
randomfoo.net
randomfoo.net
Premature optimization is the root of all evil, because it leads to micro-optimizations rather than architectural optimizations...since Twitter seems to be running an awful lot of boxes for shipping around tiny (really tiny) messages, I can't help but think they need some architectural optimizations. And that's something it takes the whole team to accomplish. One guy, particularly one guy without enough power to make people fix their code, is going to be helpless in the face of that--he'll keep throwing hardware and edge caching (edge in the sense of at the edge of the outgoing network rather than the traditional sense of close to users--but without a lot of awareness of the data or application) at the problem. Sometimes it'll work, sometimes it won't.
I don't know Blaine or the Twitter situation, but I do know that scaling on a very large scale is never simple (my previous business was focused on web caching and scalability, and I've dealt with several quite large scaling situations--for sites burning way more bandwidth than Twitter). People outside of the situation probably shouldn't decide they know what went wrong and who was to blame.
I think what the advice really means is don't optimize unnecessarily. Figuring out what's necessary vs. what's frivolous optimization is actually a hard judgment call, so people (often good programmers who want to follow best practices) fall back on not optimizing at all, until they run smack into a brick wall. By then it can be too late.
I too know nothing about the Twitter situation, but it wouldn't be unusual if Blaine had nothing to do with the design decisions that are the root cause of their performance problems, nor if he had been asked to "make it scale" without actually having any power to affect the system in the necessary ways.
You go right ahead and optimize early, often, and from both ends. I don't want to get in the way of a man and his passion for optimized code.
It's a failing on my part for even bringing up premature optimization at all, particularly if I wanted to discuss anything other than premature optimization (or evil). I've been programming for over 20 years...I should have known what would happen.