When upscaling an app to handle heavier traffic, I figure that the lowest-hanging fruit are, in rough order:
- SQL optimization (indexes, joins, etc)
- output caching
- hardware (more RAM)
- code optimization (optimizing regex, include, and other expensive ingredients)
- data partitioning (and denormalizing)
- load balancing
- database replication (masters & slaves)
- asynchronicity
it's a naive list... Without some profiling, you don't know where the bottlenecks are. And data partitioning could be simple if you have a nice modular DAL, otherwise it could require a major refactoring of your app. I suppose you could just work down the list until you hit the clog, but that's a lot of wasted time.
Regardless, having this list feels good. It's like a shopping list of possibilities.
Is anything missing from it?