[This is preliminary documentation and subject to change]

# Developing Scalable Web Applications

###### Performance

In the world of single-user desktop software development, the performance requirements are clearly defined. In that context, it is important that the user does not experience a significant delay when performing common tasks.

In the early years of the World Wide Web, slow Web pages were commonplace, and for many users a long wait was tolerated. However, as more and more enterprise Web applications were created, the requirements for Web application performance began to rival those of the single-user desktop. Today, with faster communication technologies becoming prevalent, users are demanding greater increases in site performance.

###### Scalability

The real issue in Web application design is that while the application appears to the single user as a traditional desktop application, it is actually a distributed application that could be simultaneously servicing hundreds or even thousands of users.

Web applications demand performance under a wide range of environment conditions-in other words, they must be scalable. Certainly, Web applications must perform well, but good performance when being used by a single user does not necessarily translate into scalability.

There are many different metrics for determining how scalable an application is. Ideally, a truly scalable Web application should be able to:

- Serve a single user as well as it can serve hundreds or thousands of simultaneous users.
- Perform twice as well when installed on a computer with twice the resources (processors, RAM, and so on), perform three times as well on a computer with three times the resources, and so on.

Of course, these scalability requirements are ideals. However, the closer your application comes to fulfilling those ideals, the more successful your application will be when under load.

###### Design Considerations for Performance and Scalability

The most important thing to keep in mind when beginning a Web application development project is that Web applications are, for the most part, server applications. Historically, server software has been second only to operating system internals in complexity and programming difficulty. IIS and Windows® offer a variety of innovative tools that make Web application development much faster and easier, but the concerns and challenges of server software programming still exist.

Some important considerations for making your application scalable include:

- Technology Choices: As with any development platform, Windows offers a number of options for completing a given task. Making the correct choice of technologies is the first, and often most important, step in designing a scalable Web application. For example, if a client-side technology provides the same or similar functionality as provided on the server, the client-side option often makes more sense; as the application is more scalable because the client handles much of the processing load. Proper technology choices can also lead to fewer round-trips between the client and server, further improving performance. For more information, see Web Applications: An Overview and the Internet Client SDK.
- Language Choices: Choosing a development language impacts your Web application by defining the range of users who have access to it. For example, including scripting in an application will exclude users who have browsers that do not support scripting. The following lists some of the development languages available:
  - Windows Script Components
  - Visual Basic
  - Java
  - C++
- Algorithm and Work Flow Design: Even the proper technology, if used improperly, will yield poor results.
- Multithreading: IIS and Windows provides a multithreaded environment, and in order to create scalable applications, you must choose the appropriate threading model for your components.
- Resource Contention and Delay: Resource contention and leakage are often major culprits behind applications that cannot scale.
- "Real-World" Testing: You must be sure to thoroughly test your Web application in an environment that approximates the actual environment in which the application will be deployed.

A detailed analysis of all of these topics is beyond the scope of this documentation. Instead, in this section you will find a compilation of notes and procedures, specific to IIS, that will help you create a scalable Web application.

This section contains:

- Developing Scalable ASP Applications
- Developing Scalable Components
- Designing High-Performance ISAPI Applications
- Data Access Performance
- Performance and Scalability Testing

For more information about designing Web applications, see Design Decisions.

© 1997-2001 Microsoft Corporation. All rights reserved.