For the common web site has a unified thinking, is to maximize the front-end optimization, reduce database operations, reduce disk IO.
To the front-end optimization refers to the situation without affecting the functionality and experience:
Do not perform on the server in the browser,
Can be returned directly to the application server on the cache server,
The results obtained directly from the program are not to be obtained externally,
The data obtained from this machine should not be taken remotely,
The memory can not be taken to the disk,
Do not go to database queries in the cache.
Reducing database operations means reducing the number of updates, caching the results by reducing the number of queries, and doing the operations of the database as much as possible to get your program done (for example, a join query).
Reducing disk IO means not using the file system as a cache, reducing the number of read and write files, etc.
Program optimization always optimizes the slow part.
Website Performance Optimization Dafa