10 tips for writing high-performance Web applications

Source: Internet
Author: User
Tags garbage collection
This article discusses:
Common ASP. NET performance myth
Useful ASP. NET performance tips and tricks
Some suggestions for processing databases in ASP. NET
Buffer and use ASP. NET for background processing
This article uses the following technologies: ASP. NET,. NET Framework, IIS
Using ASP. NET to write Web applications is incredibly easy. It is so easy that many developers don't have to spend much time building their applications to achieve very good performance. In this article, I will provide 10 tips for writing high-performance Web applications. My comments are not limited to ASP. NET applications, because they are only a subset of Web applications. This article is not an authoritative guide to Web application performance adjustment-this content can be written into a book. On the contrary, this article can be regarded as a good start point.
I often go to rock climbing before I work in an out-of-the-box environment. Before rock climbing, I always look at the routes in the guide and read the suggestions and advice from people who used to come here. However, no matter how well the manual is, you must take actual actions before trying a specific and challenging climb. Similarly, before you are faced with performance problems or operating a high-throughput site, you can only find ways to write high-performance Web applications.
Our personal experience comes from Microsoft ASP. the NET team is engaged in the underlying architecture program manager, runs and manages www.asp.net, and assists in the architecture Community Server process experience. The Community Server is a few famous ASP. the next version of the. NET application. NET Forums ,. text and nGallery are integrated into one platform ). I'm sure these skills that have helped me will also benefit you.
You should consider separating applications into several logical layers. You may have heard of the term 3-layer (or n-layer) physical architecture. They are typically defined architectural patterns that define physical division of functions across processes and/or hardware. More hardware can be added when the system needs to be scaled. However, you should always avoid performance problems related to processes and machine busyness. Therefore, whenever possible, run the ASP. NET page and related components in the same application.
Because of the boundary separation between codes and layers, using Web services or remote calls will reduce the performance by more than 20%.
The data layer is slightly different, because the database usually uses dedicated hardware. However, the processing cost of the database is still very high. Therefore, when optimizing the code, the performance of the data layer should be the top concern.
Before you begin to solve the performance problems of your application, you must analyze the application to identify the problem. Obtaining key performance counter values (for example, the value of the performance counter for percentage of the time spent in garbage collection) is also important for finding out where the application is most time-consuming. Intuitively, time consumption can often be found.
There are two types of performance improvements described in this article: Large-scale optimization, such as using ASP. NET Cache and repeated micro-optimization. These micro-optimizations are sometimes interesting. Small changes to the code can cause a large volume of movement, resulting in thousands of calls. For large optimization, you may see a huge jump in overall performance. For micro-optimization, a given request may only be adjusted in milliseconds, but the results may be greatly improved based on the total number of requests per day.
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.