High Performance-instantaneous response
Website performance from different perspectives:
1. website performance from a user perspective
Users can directly feel the speed on the browser. This includes the communication time between the user's computer and the server, the server processing time, and the time when the browser constructs the request and parses the response data.
Frontend Optimization Methods: optimize the HTML style of pages, compress resources (JS, CSS, HTML, etc.), adjust browser cache policies based on concurrent and asynchronous features of browser segments, and use CDN services, reverse Proxy.
2 Developer perspective
Performance indicators: Response latency, system throughput, concurrent processing capability, and system stability.
Main Means: Use cache to accelerate reading, use clusters to increase throughput, use Asynchronous acceleration of Request Response and peak elimination, and use code optimization to improve program performance.
3 O & M personnel perspective
Focus on infrastructure performance and resource utilization.
Main Means: Build backbone networks, use cost-effective custom servers, use virtualization technology to optimize resource utilization, and consider using elastic cloud services (cloud computing ).
4. Performance Test Indicators
Response time, concurrency, throughput, and performance counters.
Response time: the number of requests processed by the system per unit time, reflecting the overall processing capability of the system. The number of requests/s, the number of pages/s, the number of visits/day, and the number of services processed/hour. TPS, HPS (HTTP requests per second), and QPS queries per second.
Performance counters: records include system load, number of objects and threads, memory usage, CPU usage, disk and network I/O, and other indicators.
System load refers to the total number of processes currently being executed by the CPU and waiting for the CPU to execute. It is an important indicator that reflects the system's free and busy schedule. The ideal value is the number of CPUs.
The details are as follows: Performance Testing, load testing (the maximum load point of the test system), stress testing (the collapse point of the test system), and stability testing.
L optimized after performance analysis:
Based on the website layered architecture, it can be divided
Ü Web Front-end optimization: browser access optimization (reduce HTTP requests, use browser cache, enable compression, put CSS on top, put JS on the bottom of the page, and reduce cookie transmission ); CDN acceleration (first hop for network access), reverse proxy, etc.
Ü application server performance optimization: distributed cache (function: reduces Data Access time and computing time. Pay attention to cache push usage and prevent cache penetration); asynchronous operations (good off-peak effect); cluster use; code optimization (multithreading, resource reuse, data structure, and garbage collection ).
Two factors need to be taken into account in the remote communication design. One is the communication protocol, the other is the serialization protocol (such as XML, SOAP, JSON, and other text protocols, or some binary protocols)
Ü storage server performance optimization: SSD, Distributed File System HDFS, and LSM.
Finally, the user experience is fast or slow. It can be improved by technical means or by optimizing the interactive experience.