Checklist: Architecture and Design Review for Performance and Scalability

 

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

patterns & practices Developer Center

Improving .NET Application Performance and Scalability

J.D. Meier, Srinath Vasireddy, Ashish Babbar, and Alex Mackman
Microsoft Corporation

May 2004

Related Links

Home Page for Improving .NET Application Performance and Scalability

Send feedback to Scale@microsoft.com

patterns & practices Library

How to Use This Checklist

This checklist is a companion to Chapter 4, "Architecture and Design Review of a .NET Application for Performance and Scalability"

Deployment and Infrastructure

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Use distributed architectures appropriately. Do not introduce distribution unnecessarily.
Ff647699.checkbox(en-us,PandP.10).gif Carefully select appropriate distributed communication mechanisms.
Ff647699.checkbox(en-us,PandP.10).gif Locate components that interact frequently within the same boundary or as close to each other as possible.
Ff647699.checkbox(en-us,PandP.10).gif Take infrastructure restrictions into account in your design.
Ff647699.checkbox(en-us,PandP.10).gif Consider network bandwidth restrictions.
Ff647699.checkbox(en-us,PandP.10).gif Identify resource restrictions.
Ff647699.checkbox(en-us,PandP.10).gif Ensure your design does not prevent you from scaling up.
Ff647699.checkbox(en-us,PandP.10).gif Ensure your design does not prevent you from scaling out and it uses logical layers, does not unwittingly introduce affinity, and supports load balancing.

Coupling and Cohesion

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Ensure your design is loosely coupled.
Ff647699.checkbox(en-us,PandP.10).gif Exhibit appropriate degrees of cohesion in your design and group together logically related entities, such as classes and methods.
Ff647699.checkbox(en-us,PandP.10).gif Restrict use of late binding and only use late binding where it is necessary and appropriate.

Communication

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Interfaces do not enforce chatty communication.
Ff647699.checkbox(en-us,PandP.10).gif Ensure your application only makes remote calls where necessary. Impact is minimized by client-side validation, client-side caching, and batching of work.
Ff647699.checkbox(en-us,PandP.10).gif Optimize remote data exchange.
Ff647699.checkbox(en-us,PandP.10).gif Choose appropriate secure communication mechanisms.
Ff647699.checkbox(en-us,PandP.10).gif Use message queues to decouple component parts of your system.
Ff647699.checkbox(en-us,PandP.10).gif Mitigate the impact of long-running calls by using message queues, "fire-and forget" approaches, and asynchronous method calls.
Ff647699.checkbox(en-us,PandP.10).gif Do not use processes where application domains are more appropriate.

Concurrency

Check Description
Ff647699.checkbox(en-us,PandP.10).gif In your application do not create threads on a per-request basis, and use the common language runtime (CLR) thread pool instead.
Ff647699.checkbox(en-us,PandP.10).gif Only types that need to be thread-safe are made thread-safe.
Ff647699.checkbox(en-us,PandP.10).gif Carefully consider lock granularity..
Ff647699.checkbox(en-us,PandP.10).gif Ensure your application acquires shared resources and locks late and releases them early to reduce contention.
Ff647699.checkbox(en-us,PandP.10).gif Choose appropriate synchronization primitives.
Ff647699.checkbox(en-us,PandP.10).gif Choose an appropriate transaction isolation level.
Ff647699.checkbox(en-us,PandP.10).gif Ensure your application uses asynchronous execution for I/O bound tasks and not for CPU bound tasks.

Resource Management

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Ensure your design supports and makes effective use of pooling.
Ff647699.checkbox(en-us,PandP.10).gif Ensure your application acquires resources late and releases them early.

Caching

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Use caching for data that is expensive to retrieve, compute, and render.
Ff647699.checkbox(en-us,PandP.10).gif Cache appropriate data such as relatively static Web pages, specific items of output data, stored procedure parameters, and query results.
Ff647699.checkbox(en-us,PandP.10).gif Do not use caching for data that is too volatile.
Ff647699.checkbox(en-us,PandP.10).gif Select an appropriate cache location.
Ff647699.checkbox(en-us,PandP.10).gif Select an appropriate cache expiration policy.

State Management

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Your design favors stateless components. Or, you considered the negative impact on scalability if you decided to use stateful components.
Ff647699.checkbox(en-us,PandP.10).gif If you use Microsoft® .NET Framework remoting and need to support load balancing, you use single call server-activated objects (SAO).
Ff647699.checkbox(en-us,PandP.10).gif If you use Web services, you also use a message-based stateless programming model.
Ff647699.checkbox(en-us,PandP.10).gif If you use Enterprise Services, also use stateless components to facilitate object pooling.
Ff647699.checkbox(en-us,PandP.10).gif Objects that you want to store in state stores support serialization.
Ff647699.checkbox(en-us,PandP.10).gif Consider the performance impact of view state.
Ff647699.checkbox(en-us,PandP.10).gif Use statistics relating to the number of concurrent sessions and average session data per user to help choose an appropriate session state store.

Data Structures and Algorithms

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Ensure your design uses appropriate data structures.
Ff647699.checkbox(en-us,PandP.10).gif Use custom collections only where absolutely necessary.
Ff647699.checkbox(en-us,PandP.10).gif Extend the IEnumerable interface for your custom collections.

Data Access

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Pass data across the layers by using the most appropriate data format. Carefully consider the performance implications.
Ff647699.checkbox(en-us,PandP.10).gif Use stored procedures with the Parameters collection for data access.
Ff647699.checkbox(en-us,PandP.10).gif Only process the data that is required.
Ff647699.checkbox(en-us,PandP.10).gif Where appropriate, provide data paging solutions for large result sets.
Ff647699.checkbox(en-us,PandP.10).gif Use Enterprise Services declarative transactions for transactions that span multiple resource managers or where you need to flow transaction context across components.
Ff647699.checkbox(en-us,PandP.10).gif If you manipulate binary large objects (BLOBs), use appropriate chunking techniques, and do not repeatedly move the same BLOB.
Ff647699.checkbox(en-us,PandP.10).gif Consolidate repeated data access code into helper classes.

Exception Handling

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Do not use exceptions to control regular application flow.
Ff647699.checkbox(en-us,PandP.10).gif Use well-defined exception handling boundaries.
Ff647699.checkbox(en-us,PandP.10).gif Structured exception handling is the preferred error handling mechanism. Do not rely on error codes.
Ff647699.checkbox(en-us,PandP.10).gif Only catch exceptions for a specific reason and when it is required.

Class Design Considerations

Check Description
Ff647699.checkbox(en-us,PandP.10).gif Classes own the data that they act upon.
Ff647699.checkbox(en-us,PandP.10).gif Do not use explicit interfaces unnecessarily. Use explicit interfaces for versioning and for polymorphism where you have common functionality across multiple classes.
Ff647699.checkbox(en-us,PandP.10).gif Classes do not contain virtual methods when they are not needed.
Ff647699.checkbox(en-us,PandP.10).gif Prefer overloaded methods to methods that take variable parameters.

patterns & practices Developer Center

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

© Microsoft Corporation. All rights reserved.