4 ms·
Do the easy stuff first: 1. Enable caching & get the HTTP-headers with e-tags and stuff. 2. Get DB schema with proper indexes & tune database settings. 3. Buy b
by stelund 17y ago
Do the easy stuff first:
1. Enable caching & get the HTTP-headers with e-tags and stuff.
2. Get DB schema with proper indexes & tune database settings.
3. Buy better hardware where there are bottlenecks
4. Fix the software ;)
- smokinn 17y agoA point on 4: Find or, in very extreme circumstances, write your own very lightweight profiler you can run on production servers. This will be a life-saver. The bottlenecks are very rarely where you think they are. Even when they are, there is typically lots of low hanging fruit hanging around that you don't know about until you profile. Also, you should have some sort of monitoring software running aggregating stuff like server loads, connection stats, number of db requests, memcached hits/misses, etc. Cacti I find quite good for this.
- mtw 17y agoI disagree with "buy better hardware" (unless you are thinking of just additional RAM or getting a SSD instead of a regualar hardware) imho you need to design with horizontal scaling in mind
- staunch 17y agoThe idea that everyone needs to scale horizontally has become very much less true than it was. Only Very Large sites have to go very horizontal at all these days. Given 8 x 3Ghz core / 32GB / 5TB machines for cheap you're packing as much power as 15+ servers of a few years ago. Even quite large web sites can be run off a few beefy (but cheap!) servers. This means money saved on network infrastructure, power, space, management, etc. Probably 80% of the Alexa top 1000 could each be run off less than 20 modern beefy machines.