"Large Web site Technology architecture: Core Principles and Case studies"--Reading Notes (2): Large Web site Core architecture elements (1)--performance

Source: Internet
Author: User
Tags message queue browser cache

1. Performance

On the browser side, it is possible to improve performance through browser caching, using page compression, reasonably layout pages, and reducing cookie transmission. You can also use a CDN to distribute static content from your site to the closest Web service provider's room. You can deploy a reverse proxy server in the site room, cache hotspot files, and speed up request response.

On the application server side, you can use server local cache and distributed cache. You can also send a user request to a message queue for subsequent task processing through an asynchronous operation, and the current request is returned directly to the user.

Multi-application Server to form a cluster of common external services.

At the code level, you can optimize performance by using multiple threads, improving memory management, and so on.

1.1 Performance Test metrics: Response time, concurrency count, throughput, performance counters

1.2 Performance test methods:

1.2.1 Performance test: The system design initial planning performance indicators as the expected goal, the system constantly pressure, difficult system in the acceptable range of resources can achieve performance expectations

1.2.2 Load test: The system continuously increases concurrent requests to increase system pressure until one or more of the system's performance metrics reach a security threshold. If a certain resource has been saturated, then continue to exert pressure on the system, the processing capacity of the system not only can not improve, but will decline.

1.2.3 Stress test: The system continues to exert pressure over the security load until the system crashes or no more requests can be processed to obtain maximum system pressure tolerance.

1.2.4 Stability Test: In the specific hardware, software, network environment conditions, to the system load a certain business pressure, so that the system runs for a long time, in order to detect the stability of the system.

1.3 Performance optimization

1.3.1 Front-end performance optimization: Reducing HTTP requests: Merging CSS, merging JS, merging pictures using browser cache: For Css,js,logo and some of the low update frequency of the statement resource file, you can set the HTTP header Cache-control and expired properties, slow the presence of the browser Enable compression: Compression can have a certain amount of pressure on the server and the browser CSS on the top of the page, JS placed at the bottom of the page reduce cookie transmission, consider using a separate domain name for static resources

1.3.2 CDN Acceleration

1.3.3 Reverse Proxy

1.3.4 Application Server Performance optimization Distributed cache: Memcached Asynchronous operation: Anything that can be done late should be done later. using clusters code optimization: Multithreading, Resource reuse (database connections, complex objects, etc.), data structures, garbage collection

1.3.5 Storage Performance Optimization solid-State drive vs. mechanical HDD B + Tree vs LSM Tree RAID vs HDFS

"Large Web site Technology architecture: Core Principles and Case studies"--Reading Notes (2): Large Web site Core architecture elements (1)--performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.