This white paper describes the technical architecture of Chili!Soft ASP and its performance features, and examines the horizontal and vertical scalability of Chili!Soft ASP.
In this white paper:
· Executive Summary
· Chili!Soft ASP Architecture
Multi-process or Multi-threaded
ASP Page Pre-compilation
ASP Page Caching
Object Caching
Database Connection Pooling
· Horizontal Scalability Options
Software Solutions
Round-Robin DNS
Clustering Software
Hardware Solutions
Vertical Scalability Options
· The Future of Chili!Soft ASP Scalability
Transaction and Application Server Support
Cross-machine Application and Session Management
In-memory Communications
· Conclusion
· Company and Product Overview
About ASP
About Chili!Soft ASP
About Chili!Soft
When Chili!Soft ASP moved the Active Server Pages framework from the Windows NT world to the UNIX world, it was clear that some changes had to be made. The architectural model that performed the best on Windows NT was not necessarily the best for the different variants of UNIX. With the newest version of Chili!Soft ASP, the architecture of the core engine has been enhanced to maximize its flexibility to suit the differing needs of highly varied computing environments.
Chili!Soft ASP now supports an architecture that provides an either multi-process or multi-threaded engine for servicing requests for ASP pages. The engine automatically spawns new processes or threads to meet demand, and a task manager controls how requests are sent to different processes (or threads). Chili!Soft ASP also supports an architecture that allows the Chili!Soft ASP engine to run on a separate machine from the Web server. Finally, Chili!Soft ASP also supports such features as page pre-compilation, page caching, object caching and database connection pooling.
Chili!Soft ASP supports various models for horizontal scalability and load balancing, including both software- and hardware-based solutions. For example, Chili!Soft ASP can support software-based solutions such as round-robin DNS or load balancing software from Bright Tiger or Microsoft. Chili!Soft ASP also can be used with hardware-based scalability and load balancing products such as Cisco Local Director, F5 BigIP, and ArrowPoint Content Smart Switch. Each of these products support the concept of "sticky sessions," necessary for session-based applications to function properly.
Chili!Soft ASP can also scale vertically on a single machine, along with the underlying operating system. Chili!Soft ASP can fully exploit the scalability and performance improvements that are available through different operating systems. In test’s on a multi-processor Solaris box, for example, Chili!Soft ASP performance scaled to within 5 percent of linear as additional processors were added.
In the future, Chili!Soft ASP will continue to add additional scalability features, such as support for transaction servers, and cross-machine session and application management.
Chili!Soft ASP offers a number of architectural elements to enhance its scalability and performance, including the following:
· Dual mode multi-process or multi-threaded engine
· Page pre-compilation
· Page caching
· Object caching
· Database connection pooling
Let’s take a closer look at each of these different elements.
The Chili!Soft ASP architecture is different on Windows NT than on UNIX. The Windows NT product provides a multi-threaded engine for servicing ASP page requests. On UNIX, however, Chili!Soft ASP provides an engine that can run in either multi-threaded or multi-process mode.
For almost all ASP applications, we recommend running Chili!Soft ASP in the multi-process configuration. Just like the Apache Web server, Chili!Soft ASP is able to provide excellent performance as a multi-process server, but is able to take advantage of all of the stability benefits of a multi-process architecture. Multi-process mode provides increased stability because if one process goes down, the other processes pick up the load while the failed process is restarted. A diagram of the Apache Web server running against a multi-process Chili!Soft ASP engine is shown to the left.
The Chili!Soft ASP Task Manager is responsible for routing new ASP page requests to the Chili!Soft ASP process that is the least utilized. Currently, the Chili!Soft ASP Task Manager communicates with the Chili!Soft ASP Engine via network communications. In the future, the Task Manager will be able to communicate with the Chili!Soft ASP engine via in-memory communications, to provide additional performance. However, this will require Chili!Soft ASP and the Web server to reside on the same machine. After the initial ASP page request, the Task Manager then routes subsequent requests from the same client to the same Chili!Soft ASP process. If a Chili!Soft ASP process should fail, the Task Manager will route the requests to different processes and start another process as needed. The maximum number of processes that Chili!Soft ASP will start is configurable.
Running Chili!Soft ASP in multi-threaded mode can provide the best performance for certain types of ASP applications. For example, if an ASP application makes heavy use of the Application object, Chili!Soft ASP will provide better performance when running in multi-threaded mode. In this mode, Chili!Soft ASP is able to spawn new threads for servicing page requests as the load increases, up to a configurable maximum number. A diagram of the multi-threaded Netscape server running against a multi-threaded Chili!Soft ASP engine configuration appears to the left. In this configuration, the Chili!Soft ASP "stub" (an NSAPI server extension) uses network communications in order to pass ASP page requests to the Chili!Soft ASP engine for processing. Future versions of Chili!Soft ASP will allow in-memory communications between the Web server extension and the Chili!Soft ASP Server. However, this would require the Web server and Chili!Soft ASP to reside on the same machine.
As mentioned earlier, running Chili!Soft ASP in multi-threaded mode improves the performance of ASP pages that make heavy use of Application objects. An Application object can be used to maintain information that is common to all users accessing a defined set of ASP pages (an ASP "application"). In multi-threaded mode, the Application object is maintained within the overall Chili!Soft ASP process. This means that individual threads servicing requests for pages that use an Application object can access that object more quickly than if it was out of process.
While the multi-process Apache server was shown with a multi-process Chili!Soft ASP engine and the multi-threaded Netscape server with a multi-threaded Chili!Soft ASP engine, this is not a requirement. Multi-process Apache can be run against a multi-threaded Chili!Soft ASP and multi-threaded Netscape can be run against a multi-process Chili!Soft ASP. Another important detail for Chili!Soft ASP performance and scalability is the option to run Chili!Soft ASP on a physically separate machine. It is possible to configure an environment with the Web server(s) running on a different machine than the Chili!Soft ASP engine. In this case, the Chili!Soft ASP extension or Task Manager communicates with one or more other machines running Chili!Soft ASP via network communications. This configuration provides an option for adding additional Chili!Soft ASP servers to handle additional demand.
A performance feature built into Chili!Soft ASP is pre-compilation of ASP pages. When an ASP page is placed on the server, it is not compiled by the Chili!Soft ASP engine until it is requested for the first time. When a request comes in, Chili!Soft ASP compiles the page into bytecode that can be more quickly processed by Chili!Soft ASP when subsequent requests for the page comes in. Pages in either VBScript or JScript are compiled into bytecode.
After the ASP page has been compiled, it can be cached by the Chili!Soft ASP engine. Chili!Soft ASP can be configured to cache all requested pages, cache a set number of pages, or cache no pages at all. Typically, Chili!Soft ASP is configured to cache all of ASP pages that are requested. This is optimal for small sites, or sites that have a small number of heavily used pages. However, as the number of pages grows, the Chili!Soft ASP engine might end up caching (and storing in memory) a lot of pages that are rarely requested. To avoid this, Chili!Soft ASP may be configured to only cache the most recently used pages. By specifying the number of pages to cache, large, busy sites can control the memory usage of the Chili!Soft ASP server (improving performance), while still ensuring that the most popular pages are kept in the cache.
Chili!Soft ASP offers the ability to store objects with either session scope or application scope. Session scope maintains an object that is specific to a particular user, while application scope maintains an object that is particular to an ASP application. An ASP application is a group of files and directories that make up a logical application. By maintaining frequently used objects in memory, Chili!Soft ASP is able to limit the overhead necessary with creating and destroying objects as they are used. Chili!Soft ASP also efficiently allocates and releases the resources used by objects to ensure that unused objects do not use up valuable memory.
One of the most expensive operations in typical Web applications is accessing database information. Web application environments such as Perl or CGI will open a connection to the database, retrieve the data, and close the connection. Each subsequent request will do the same thing, repeatedly opening and closing the database.
The solution to this problem is database connection pooling. Chili!Soft ASP is able to open a number of connections to the database that are shared across all of the users accessing the Web application. Instead of opening and closing a database connection for each request, Chili!Soft ASP simply uses one of the connections that is already open for fulfilling the request. This dramatically improves the performance of applications that rely heavily on database operations.
The classic model for providing horizontal scalability is to simply add additional servers to an overall "farm" of servers. The addition of user sessions, however, adds an element of complexity to the horizontal scalability picture. In order for ASP to maintain session information for a specific user, the user’s requests must be consistently routed back to the same machine with which the initial session was created. This is called "session-aware load balancing," and can be done using either software or hardware solutions. Session-aware load balancing offers several distinct benefits:
· Applications can use the Chili!Soft ASP standard session-management capabilities, and the Session object.
· The server managing the session is also storing the session information, making access to the session information very fast.
· State information can consist of simple variables or complex objects. (Most session management techniques are limited in the information they can store.)
· Session management is distributed across all of the servers in the Web farm, and servers under heavy load can be taken out of the rotation.
There are a few disadvantages to using session-aware load balancing to achieve horizontal scalability, such as:
· User-specific information is difficult to consolidate across all servers in the farm, without the use of a database server.
· User requests may not always be balanced evenly across all servers. (The "Law of Averages" typically takes care of this, however.)
· The Chili!Soft ASP Application object can only be used for read-only information if a single logical application is running across several different physical machines in the farm.
There are two primary techniques for handling session-aware load balancing, using only software: round-robin DNS and clustering software.
The round-robin DNS approach is implemented by setting up two or more servers that service a common logical-DNS host name. Requests to DNS then resolve this single host name into one of the names of a server in the collection. For example, the host name "www.chilisoft.com" might be resolved into one of several web servers with the host names "web1.chilisoft.com," "web2.chilisoft.com," and so forth, to "webX.chilisoft.com." By routing incoming requests to each of these servers in round-robin fashion, the load is distributed across all of them.
When a request comes into one of the physical hosts, the server must redirect the request back to itself using its physical hostname ("web3.chilisoft.com") instead of the logical hostname of the Web farm ("www.chilisoft.com".) As long as all of the Web pages in the site using relative Web links (<A HREF="/some/page.htm">) instead of absolute links (<A HREF="http://www.chilisoft.com">), the browser will issue all requests to the physical hostname. As long as the user keeps returning to the same physical host, their session information will be maintained.
This approach may seem rather restrictive by requiring developers to only use relative URLs in their Web applications. It also requires a web site to be meticulous in keeping the pages across the site consistent, it does not distribute load across servers in an intelligent fashion, and it can cause users difficulty in bookmarking a site (if the server they originally hit goes down, for example). However, the simplicity of this solution, its ease of implementation, and its session-aware abilities, can make it attractive.
Clustering software can address many of the shortcomings of the round-robin DNS approach, and is available from vendors including:
· Bright Tiger
· Microsoft.
Clustering software, like round-robin DNS, relies on a Web farm of servers running the same copies of software, and consisting of the same content. But clustering software is also able to make much more intelligent decisions on how to route new requests. Clustering software can:
· Automatically route requests to the proper server for session management
· Measure server response time in order to distribute new requests to "underutilized" servers
· Monitor servers for poor performance or shutdown, redirecting traffic away from them, and restarting them automatically
· Assist with maintaining consistency of content across all of the servers in the farm
Much of the value in the clustering software products is in their ability to implement load-balancing algorithms based on a wide variety of metrics, and even to allow the user to define their own metrics and algorithms.
There are numerous hardware solutions on the market today for providing session-aware load balancing. These products can be referred to as "intelligent routers." Vendors of intelligent routers that are fully compatible with Chili!Soft ASP include:
· Cisco (Local Director)
· F5 Labs (BigIP)
· ArrowPoint (Content Smart Switch)
Intelligent routers allow a group of servers to appear as a single, logical server. The IP address and hostname of the intelligent router is registered with DNS (as, for example, "www.chilisoft.com"), while the IP addresses and hostnames of the servers in the group remain unpublished. When the intelligent router receives a request, it routes the request to one of the servers in the group. In this manner, a group of servers can appear to a user as a single server. Intelligent routers support fail-over methods and provide different options for distributing load.
A critical element for making intelligent routers "intelligent" is the ability to work with session-aware web applications. Cisco’s Local Director, for example, offers "sticky" sessions that basically ensures that the same client gets the same server for the duration of the session. If the "sticky" session is set to 5 minutes, all requests from a specific client will be routed to the same server until the client is inactive for a period of 5 minutes. Developers using Chili!Soft ASP with an intelligent router should make sure that the intelligent router’s "sticky" time interval is the same or greater than the Chili!Soft ASP session timeout value.
Horizontal scalability has appeal where the Web serving environment relies on relatively inexpensive hardware and software. In this environment, adding a new box to the Web farm is fairly inexpensive and easy to accomplish. However, horizontal scalability approaches do have their drawbacks. For example, they require an increasing number of boxes that have to be individually configured and maintained, which can become a significant burden. As the number of machines increases, the overall environment can become significantly more complex. Furthermore, as we have seen, horizontal scalability options make it more difficult to efficiently consolidate information across servers, and in the case of ASP, the Application object’s functionality can’t be used if a logical application is running across several different physical machines.
So for some environments, vertical scalability is the end goal. Vertical scalability can be loosely defined as providing the ability for one machine to serve an increasing load, without adding additional machines. In the case of Chili!Soft ASP, with the exception of the performance features mentioned in the opening section, vertical scalability is a function of the underlying operating system and hardware platform. The usual technique for providing scalability on a specific machine is to add hardware and memory.
In internal testing, Chili!Soft ASP has shown the ability to fully exploit the scalability of the underlying operating system and platform. For example, the following chart displays performance results for a Windows NT system with one and two CPUs.
The chart above demonstrates that the throughput (pages/second) for Chili!Soft ASP on Windows NT against 1 and 2 CPUs is actually better than linear. The next chart shows the results on a Sun Solaris box, running against 1, 2, and 4 CPUs.
This chart also demonstrates that Chili!Soft ASP throughput scales vertically to within 5 percent of linear as additional processors are added. Adding additional processors to an existing server installation provides a fast, easy, and relatively inexpensive option for accomplishing vertical scalability of Chili!Soft ASP.
Transaction and application servers provide another way to enhance the scalability of a Web application solution. Transaction servers provide an efficient way to ensure that the individual actions of a logical transaction either succeed as a whole or fail as a whole. Application servers, that often include transaction server capabilities, provide the ability to build applications using server-side objects. These objects then run in the context of the application server, which provides services such as database connection management, object state management, transaction services, and more.
In the future, Chili!Soft ASP will be able to integrate with transaction servers such as Microsoft Transaction Server and Enterprise Java Beans (EJB) application servers. By combining the flexibility and power of ASP with the services provided by transaction and application servers, Chili!Soft ASP will provide even more scalability for Web applications.
As mentioned in the "Horizontal Scalability" section, the pitfalls of horizontal scalability solutions are ensuring that user sessions are consistently routed to the same server, and the limited use of the Application object to read-only properties.
In the future, Chili!Soft ASP will provide the ability to consolidate session and application information across farms of servers running Chili!Soft ASP. This will greatly simplify the process of horizontally scaling a Web environment, eliminating the need to use load balancing software or intelligent routers, and permitting logical applications to make full use of the Application object even though they are running across different physical servers.
As mentioned in the Chili!Soft ASP architecture section, Chili!Soft ASP currently communicates with the Web server extension via network (sockets-based) communications. Future versions of Chili!Soft ASP will feature an engine architecture that enables in-memory communications between Chili!Soft ASP and the Web server extension. This will provide an additional performance boost.
Chili!Soft ASP has a number of internal features that enable it to serve the needs of demanding Web environments. Furthermore, Chili!Soft ASP is compatible with several methods for achieving horizontal scalability, and shows excellent ability to scale vertically along with the capabilities of the underlying platform. Finally, Chili!Soft ASP will continue to add new technology in order to provide increased scalability in the future.
ASP is an open, compile-free Web application environment that combines scripting, HTML custom server components, and robust database publishing to create dynamic Web-based business applications. With ASP, developers can build browser-independent Web solutions and publish legacy databases to the Web using tools such as Microsoft’s Visual InterDev™, Macromedia™ Dreamweaver, Elemental™ DrumBeat, or Sybase™ Powersite. ASP is widely known for accommodating developers of varying skill sets and expertise, and for allowing corporate IT managers to more effectively allocate scarce developer resources. There are more than 500,000 ASP developers, over 500 companies producing ASP components and applications, and approximately 25,000 public Web sites using ASP.
Chili!Soft ASP is the functional equivalent of Microsoft’s ASP. Microsoft ASP is available exclusively on Microsoft’s Internet Information Server (IIS) web server on Windows NT. Chili!Soft ASP enables ASP on other leading Web servers and operating systems, making it the first open, cross-platform Web application server based on Active Server Pages (ASP) architecture. Chili!Soft ASP is supported by industry leading Web development tools such as Microsoft Visual InterDev, Elemental Drumbeat™, NetObjects ScriptBuilder™, and Sybase Powersite™, and provides ASP functionality to Netscape, Lotus, IBM and other Web servers.
Chili!Soft, Inc., a wholly owned subsidiary of Sun Microsystems, Inc. (NASDAQ: SUNW), is a provider of enabling technologies and applications for Active Server Pages. Chili!Soft's award-winning flagship product, Chili!Soft ASP, extends the ASP framework to major Web servers and operating systems including Microsoft Windows NT and Windows 2000, Sun Solaris, IBM AIX, Hewlett Packard HP-UX, and Linux. Chili!Soft was incorporated in 1997 with headquarters in Bellevue, Washington. For more information about the company, please visit the Chili!Soft Web site at http://www.chilisoft.com or call (425) 957-1122.
Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.