'Just buy bigger machines' - Uhh I mean that works but that isn't really a solution is it?
Source: http://highscalability.com/blog/2013/4/15/scaling-pinterest-...
The reason I posted the quote was to answer your on your remark that it isn't a solution - it is close to an ideal solution actually, but not applicable everywhere and at any time (e.g. sloppy/non-optimized code as you pointed out).
Hope this makes sense.
This is not a valid approach on the client side though as you don't control the hardware.