Data Structure Design:
Establish a proper data structure for business logic needs.
Intermediate optimization and network environment deployment:
Intermediary and network environment are also important factors.
Database:
1. indexes or associated indexes are used, but the more indexes, the better. Too many indexes will degrade cud performance and occupy a large amount of space.
2. Eliminate link queries for big data tables and process big data tables:
(1) You can add redundant fields to some tables. These redundant fields are frequently obtained from other tables.
(2) cache, with low changes and high data consistency requirements
(3) directly Delete associated fields
(4) split into multiple queries
3. SQL statement Optimization
Application Layer:
1. use of cash: cache can be used for high-frequency and infrequently changed operations (that is, reading, writing, and less), such as detecting user permission operations, for each operation, you must check whether the user has the permission for the operation. You can save the user's permission in the cache to avoid frequent operations on the database.
Cache Technology: memcached, JBoss cashe, oscashe, ehcache .......
2. statistical query of data: fuzzy query is commonly used for data queries of large data volumes. fuzzy query is not required if possible, and full-text search function is provided in the database, however, it has some limitations in terms of data accuracy. You can also use open-source search engines, such as Lucene under Apache.
3. Asynchronous Operation:
(1) asynchronous presentation layer: Ajax technology, common frameworks such as DWR and dojo
(2) Background business logic layer Asynchronization: JMS and MQ Technology
Web layer performance optimization:
1. Reduce HTTP requests
2. cache Ajax
3. Delayed Loading
4. Advance Loading
5. Reduce IFRAME
6. Avoid Error 404
7. Specify the expires or cache-control file header.
8. gzip compressed webpage
9. Use get to complete Ajax requests
10. Reduce cookie volume
11. Place the JS script at the bottom of the page
12. Use external JS and CSS
13. Put forward repeated steps
14. Replace @ import with <link>
15. Avoid using Filters
16. Image Optimization
17. No Image Scaling
HTTP server performance optimization policy:
Three working modes of Apache:
1. prefork
2. Worker
3. Event