Sort by msdn webcast
Logical/physical design practices
Recommendation: Use a logical three-tier model
- Page (. aspx) and user control (. ASCs)
- Reusable types (components) are placed in the \ bin directory
- Store data in SQL database
Recommendation: designed for Web farm
- Do not assume that the visitor will always return to the same server
- Pay attention to static variables and application status
- Web farm session Status
Recommendation: use the same process
Avoid (when possible ):
- Synchronous calls to XML Web Services
- Remote Call through DCOM
Use XML Web Services:
- Communication between applications on the Internet
- Do not use for intra-Application Communication
Recommendation: use an ISA Server. When a DMZ security domain is required:
- Only access through ISA is allowed
- ISA tunnel reaches ASP. NET through DMZ
- Reduce process Conversion
Language/CodeSuggestions
- Avoid late binding
- <% @ Page Language = "VB" Explicit = "true" %> declare all variable types and allow late binding
- <% @ Page Language = "VB" strict = "true" %> Any late binding is prohibited.
Com interaction suggestions
- Use managed components instead of COM
Data recommendations
- Store data in SQL Server
- Select an appropriate data access method: oledb/SQL client/ODBC
- Properly Select dataset and datareader for data access
Status Management
- Select an appropriate method to store sessions: inproc/StateServer/Database
- Use simple data types
- Avoid saving the Stas COM object in the session.
- If you do not need a session, disable it: enablesessionstate = "false"
- If possible, you can use the readonly feature: enablesessionstate = "readonly"
- If viewstate is not required, disable it. enableviewstate = false
- Minimize data in viewstate
- View viewstate size view HTML output source code or enable trace
Use Cache
- Page Cache
- Partial page Cache
- Cache object
- Data Cache
- WebService Cache
How to quantify web performance:
Machine Throughput
Response time
Test by adding load to the server
Load with multiple client machines
Free Microsoft Web application Stress
Test multiple scenarios
- Simulate end-to-end scenario traversal of the site
- Test single-page performance
Value to be calculated
- Request/sex under different loads (100,250,500,750,100 0 and other clients simultaneously accessing)
- Identify the maximum customer load within the acceptable response time of ttfb/TTLB
Key performance counters
CPU, CPU % usage | low value = overcast or locked
ASP. NET, number of incoming column requests | linear growth means the server is fully loaded
ASP. NET applications, requests per second | dynamic throughput (Consistent)
ASP. NET application, total error count | indicates a function error (it should be 0)
ASP. NET application, Working Process restart | indicates a serious function Error