Editor's Note: Each month, this column discusses various aspects of the advanced administration of Web applications and e-business sites. This month's column examines Microsoft Application Center 2000, a Microsoft .NET Enterprise Server that manages and deploys servers in a Web farm.
Microsoft Application Center 2000 is a set of tools and services that lets you manage a farm of IIS Web servers as if they were one machine. In Application Center, the concept of grouping servers to facilitate managing them as a whole is called an Application Center server cluster. With Application Center, you can create clusters or add and remove member servers to and from existing clusters.
After you've defined an Application Center server cluster, you can automatically deploy new content to the cluster group as a whole, configure load balancing, and monitor cluster performance. (See "Managing a Web Farm with Application Center 2000," February 2001, for information about installing Application Center and configuring an Application Center server cluster.) This month, I introduce you to Content and Configuration Synchronization—Application Center's ability to automatically synchronize both online content and server configuration settings when you update them, either at a scheduled time interval or manually at any time.
Content and Configuration Synchronization Uncovered
Application Center synchronization is the replication from the controller to each Application Center server cluster member of Web content, COM+ applications, virtual sites (and their associated Internet Server API—ISAPI—filters), global ISAPI filters, files (e.g., .html, .asp, images), and configuration settings. Synchronization ensures that all synchronized content is identical across the cluster and that the time and date settings on each member match the settings on the controller. When you add a new member to a cluster, Application Center automatically synchronizes the member with the controller. Application Center has three synchronization modes:
Automatic (incremental). When you add or update synchronized content on the cluster controller, Application Center immediately replicates the changes to each member in the synchronization loop. This process is analogous to an incremental backup in Microsoft SQL Server except that instead of scheduled incremental backups, Application Center immediately replicates content that you add or change on the Application Center cluster controller.
Full (periodic). Application Center automatically performs a complete synchronization of the members in the synchronization loop at regular intervals to ensure that the content on each server is identical to the controller. This process occurs regardless of when you last updated content. This process is analogous to a full backup in SQL Server at scheduled periods (e.g., every night).
Manual (full or partial). You can manually synchronize the entire cluster, specific members, or specific applications at any time. This process is analogous to performing a manual, on-demand full backup of a SQL Server database.
Application Center uses the concept of applications, which are collections of resources (e.g., Web site content, components) that are synchronized as a whole. Figure 1 shows the applications on my system. Application Center synchronization uses single-controller synchronization to deploy and synchronize Web and Microsoft .NET or Microsoft Windows DNA applications. In single-controller synchronization, you can designate only one cluster member as the controller at a time, and the controller is the authoritative source of all content and settings. Application Center doesn't deploy Win32 applications such as Microsoft Office: You need Microsoft Systems Management Server (SMS) or Active Directory (AD) to deploy Win32 applications.
At the heart of configuration, COM+, and ISAPI synchronization is Windows Management Instrumentation (WMI). By definition, WMI is an OS interface through which components can provide information and notification. WMI enables Application Center to perform powerful operations, such as deploy and monitor a COM+ component remotely.
Application Center Synchronization in Action
I tested Application Center synchronization with a Web application called Active Directory Web-based Administrator. This application is a sophisticated Web application with HTML, Dynamic HTML (DHTML), XML, Active Server Pages (ASP), three COM+ components, and a COM+ Events class. This application is also hosted in two virtual directories, and one of its components reads the registry. Although the installation process is well documented, the process takes a few steps. You can download the application, entitled "TechEd (6-411) Windows DNA with Middle Tier Active Directory COM+ Objects," with its installation instructions from http://www.interknowlogy.com/resources/support.asp.
After I installed Active Directory Web-based Administrator on my cluster controller's Web server, I created an Application Center application in the Microsoft Management Console (MMC) Application Center snap-in by highlighting Applications in the left pane and clicking New. I gave the application a name (Active Directory Web-based Manager), then clicked OK.
I then needed to add resources to the Application Center application. First, I added the content of my Web application. From the Resource Type drop-down list, I selected Web Sites and Virtual Directories, then clicked Add. The three Web sites on my Application Center cluster controller IIS 5.0 Web server appeared. I drilled down to the first virtual directory, TechEd2k, highlighted it, then clicked OK. I performed the same actions for the second virtual directory, EventAudit.
Next, I needed to add the COM+ resources to the Application Center application. From the Resource Type drop-down list, I selected COM+ Applications, then clicked Add. Application Center listed all the COM+ applications on my server. I chose the InterKnowlogy COM+ application, which houses the components that Active Directory Web-based Administrator uses, and clicked OK.
If I used ODBC data sources in Active Directory Web-based Administrator, such as SQL Server connection parameters, I would add the resource type Data Sources at this point. Because the only data-storage device that this application uses is AD and I don't require a Data Source Name (DSN) for its connectivity, I skipped this resource.
Active Directory Web-based Administrator's COM+ Events class writes an XML data file as its auditing log. Realistically, in production, I would let each Web server write its own log, but for the sake of explanation and completeness (and just to test this feature), I selected File System Paths from the Resource Type drop-down list and clicked Add. I navigated to the XML data file and clicked OK to add it as a resource to the Application Center application.
Finally, I needed to add the registry resources to the application. From the Resource Type drop-down list, I selected Registry Keys, then clicked Add. I navigated to the registry subkey that holds the configuration parameters that Active Directory Web-based Administrator uses, then clicked OK. Figure 2 shows the Application Center snap-in after I added all the resources to my Application Center application.
Testing the Application
Now, I was ready for some testing. In the Application Center snap-in, I highlighted Active Directory Web-based Manager and clicked Synchronize. Although I could hear a flurry of disk activity, no status bar appeared to tell me what was going on. Nor was there any indication that synchronization had finished. Confused, I moved over to my cluster member to see whether anything had happened. Sure enough, the synchronization had worked perfectly: The synchronization process had copied over the registry keys, created and populated the virtual directories with all the content, and even copied over the XML data file resource with all the appropriate folder structure that it contains. I hope that Microsoft will fix the missing status bar problem in Application Center's release to manufacturing (RTM) version.
Two caveats exist for deployment and synchronization. First, Application Center Content and Configuration Synchronization doesn't automatically deploy or synchronize COM components and COM+ applications. You must use the Deployment Wizard to deploy them to each cluster member manually. (For an overview of the deployment and synchronization process for COM+ applications, see the sidebar "Deploying and Synchronizing COM+ Applications," page 9.) Second, you must also use the Deployment Wizard to manually deploy global ISAPI filters to the cluster controller. Application Center will synchronize the ISAPI filters with the members when you restart the Web service.
The Beauty Is in the Details
What's really amazing about Application Center is that it deployed the content, components, and configurations down to the most minute detail. For example, I removed Anonymous access to the application, which is a property persisted in the IIS metabase, and Application Center caught that change and deployed it.
The real danger and power of using this set of tools is that it exposes the mistakes of software developers. Application Center will deploy as is any resource that contains hard-coded values within an Application Center cluster. If an ASP file contains a hard-coded reference (e.g., to a server name), Application Center will deploy the reference and your Web application will be broken. Worse yet, your Web application will function but use the wrong resources. Say, for example, that your developers hard-code the name of a SQL Server or ODBC connection that refers to a database on a test server. Can you imagine the ramifications of Application Center moving code into production that attempts to use a test database? If the move were successful, you might not catch the problem for hours, maybe even days.
The deployment of Web applications into production is difficult. Deploying Web applications into Web farms is one of the most challenging duties of IIS administrators. Just keeping content updated and synchronized in Web farms is tough. However, Application Center can help you dramatically in the deployment and synchronization of Web application content, components, and configurations.