Scott Stanfield and Scott Hernandez
Vertigo Software, Inc.
November 1999
Summary: Fitch & Mather Stocks 2000 (FMStocks 2000) is a sample application, developed for Microsoft Windows 2000, that simulates a public stock trading Web site on the Internet. In particular, this article describes the benefits that Microsoft Windows 2000 and COM+ bring to Internet applications. Using the FMStocks 2000 sample application as a guide, and Microsoft Windows DNA 2000 as the framework, it explains the major enhancements in availability, scalability, performance, and management available in Microsoft Windows 2000. (6 printed pages)
Click here to install all the sample code and documentation to your local drive.
What Is Fitch & Mather Stocks?
Scalability
Availability
Fitch & Mather Stocks 2000 Article List
About the Authors
For More Information
Fitch & Mather Stocks (FMStocks) is a Microsoft® Windows® Distributed interNet Applications Architecture (Windows DNA) sample application that demonstrates key customer requirements such as high performance, scalability, and availability. The Web application simulates a public stock trading Web site.
There are several reasons for you to use FMStocks to help you deliver solid Windows DNA applications:
Currently, there are two versions of Fitch & Mather Stocks:
The first version of the Web application was unveiled at Tech*Ed 1999 in Dallas, Texas on May 25th. Live on stage, we loaded the site with 5,000 virtual users, with less than 1 second delay between pages served.
Complete documentation for FMStocks 1.0 can be found at "Fitch & Mather Stocks: Start Here."
The Web application was developed using Windows NT 4.0, MTS, and SQL Server 7.
For the second release of the sample, we focused on migrating to Windows 2000 and taking advantage of the new COM+ features. We also added more substantial client-state management by incorporating a simple online bookstore and shopping cart.
If you plan on diving deep into the FMStocks 2000 articles and code, we strongly suggest that you first review the FMStocks 1.0 articles. Because the overall architecture is the same, most of what you read is still applicable.
The site was developed and testing by using Windows 2000 Advanced Server (Release Candidate 2), COM+, and SQL Server 7.
When we started upgrading FMStocks 1.0 for Windows 2000, our first goal was to ensure the site worked out of the box, without modifications (it did). Next we considered a set of new features and requirements that a normal e-commerce Web application would encounter. It would need to:
All of our goals were met. The most stunning result was the increase in raw performance. If you consider the upgrade cost in terms of time and labor (two full-time developers and one full-time load tester for six weeks), the net result was extremely satisfying.
The key ingredient for a high performance Web application is scalability, because predicting capacity requirements under load is difficult. The wrong platform can leave you stranded as more users burden your Web application.
If your software architecture doesn't enable scalability, no amount of hardware can fix performance problems. Windows 2000 and the Windows DNA 2000 platform provide us with architectural guidance and a framework to achieve stellar scalability.
Scalability can be defined in two ways:
Our database server is a good example of scaling up: multiple processor support and a larger memory space gave us better performance on a critical server. Network Load Balancing allowed us to add servers to our Web farm, thereby increasing our load capacity.
In April 1999, just before Tech*Ed, we sent FMStocks 1.0 to National System Test Lab (NSTL) at www.nstl.com to conduct independent performance testing. NSTL found the application was capable of servicing 7,500 concurrent Web users with page delay times of less than 5 seconds.
The full NSTL results can be found at http://msdn.microsoft.com/vstudio/centers/scale/default.asp.
Note FMStocks 1.0 was performance tested at NSTL on 4 Compaq 6400r Web servers and 1 Compaq 6500 SQL Server 7 database server, all running Windows NT 4.0.
At the same time, portions of the middle tier source code and design were used for the PC Week Labs Application Server Benchmark. PC Week's publication of the results showed Windows NT 4.0 serving almost 3,500 Web pages per second—over 250% faster than any of the other platform environments tested.
The tests done by PC Week Labs were based on a different application from FMStocks, with separate performance characteristics. Their network, testing methodologies, and testing tools were not the same as those used by NSTL, or in private Microsoft tests. The different set of tests confirm the successful flexibility of the Windows DNA Architecture. Recently, the PC Week Benchmark, an independent lab test, recognized that applications based on the Windows DNA Architecture excelled in both performance and scalability.The PC Week Benchmark results can be found at http://msdn.microsoft.com/vstudio/centers/scale/default.asp.
The FMStocks 2000 application, tuned and running on a Windows 2000 set of servers, turned in even more impressive results than FMStocks 1.0. Performance results of 15,000 concurrent users with sub-second response times were observed in our labs. For the full announcement, visit http://www.microsoft.com/PressPass/features/1999/09-13webdev.htm.
Note FMStocks 2000 was performance tested on six Compaq 6400r Web servers and one Compaq 6500 SQL Server 7 database server, all running Windows NT 2000 Advanced Server.
To put these figures in perspective, consider real figures based on the top Internet sites.
The FMStocks 2000 tests used virtual users with average think times of only 10 seconds per page. A recent study performed by Media Metrix, Inc. found the average time a user spends on each page is closer to a full minute.
Serving up pages in less than a second is no easy task. In fact, the Web Performance Index in the September 1999 issue of Internet World (http://www.internetworld.com), clocked the average Web page download time at 5.06 seconds. The fastest site, Yahoo, serves up pages in 1.39 seconds, slower than the fully dynamic pages served up in FMStocks.
The key to a Web site's availability is a successful architecture that keeps the entire application running in the event of a single system failure. Optimum availability has two important implementation points.
First, the Windows 2000 operating system includes enhancements that emphasize reliability on a single machine, including auto-restart of system services, WBEM, and system file protection.
Second, the entire system's availability is increased through elimination of any single point of failure through three clustering services. The three physical clustering configurations that provide ideal support for FMStocks three-tier architecture are:
Note This configuration is referred to as active/passive: one active server, with a hot-backup machine available for a hardware or software failure on the active machine. To demonstrate and test the availability at each level, we pulled the plug on individual systems in each tier, while under load. The system handled these conditions gracefully, with minimal impact on overall performance.
We encourage you to read more about FMStocks. Below is a list of articles that are best read in the following order.
The Setup article discusses the requirements and instructions needed to deploy FMStocks 2000 on a single machine so you can try out the application, and view and step through the source code. This article is interesting from an administrator's or system architect's point of view. There are useful notes about deployment on Windows 2000 in this article.
The Component Services Manager is used to create and deploy the new COM+ Applications for FMStocks 2000. During this process, Events, Subscribers, and Transactions are configured. The issue of Component Context (in what security context the component is run) is discussed.
SQL Server Query Analyzer is used to load the database Schema. Then the SQL Server Data Transformation Services (DTS) are used to populate the database. During this process, 1000 test accounts are also created in the SQL Server database.
Another interesting note is how the Web Application is registered in IIS. The IIS Administrative Object is used, via a VBScript file, to create the virtual directory for the Web Application.
The Core Components article discusses some of the technical choices made while porting from FMStocks 1.0 (Windows NT 4.0, IIS 4) to FMStocks 2000 (Windows 2000 Server Family, IIS 5). Special detail is paid to the changes that were necessary to get high performance with FMStocks 2000. The issues we encountered during development are discussed here, with emphasis on best practices, from both the architectural and coding perspectives.
The Store article discusses some of the technical choices made while adding new e-commerce features to FMStocks 2000.
It also discusses what changes were made to each tier as we added new functionality to the FMStocks 2000 core. In the Store implementation, particularly important is a discussion of state management.
In addition, the Store article discusses the issues and choices we made while designing and coding for asynchronous functionality between the Presentation tier, the Web servers, and back-end business processing, done on dedicated Application Servers. The separation of presentation and business logic is also covered in this article.
The Security article discusses the implementation of a new security mechanism for FMStocks 2000. The ISAPI Filter is written in C++. There is a section devoted to issues of time-based security using the Windows Crypto APIs. Also discussed is an interesting side effect of the filter that obviates the need for client-side cookies.
The Office 2000 Clients article discusses the goals and benefits derived from adding new clients to the FMStocks 2000 core services. It also delves into the technical details related to the implementation of a Web-based solution using the Office Web Components (OWC), and a rich Excel client. We emphasize using XML, as opposed to HTTP, as the data transport between our business components and the new Office 2000 clients and discuss in detail the issues of security, offline usage, and integrating with an existing architecture.
Scott Stanfield is the author of FMStocks 1.0 and the President & CEO of Vertigo Software, Inc.
Scott Hernandez is a Senior Software Developer at Vertigo Software, Inc. As an MVP, he can be found roaming the Microsoft development newsgroups.
They can both be reached at fmstsocks@vertigosoftware.com or on the Web at http://www.vertigosoftware.com/.